Original Post
Hi.
If i had some surfaces that had bump mapping and some surfaces that dont how should i handle both of them in the same shader.
Currently i do so by using a flag. i sent a integer as a uniform and i branch the flow of the shader based on its value (0 or 1). but as i understand this is far from optimal.
Instead i thought i should always keep bump mapping "on" and then create "default" tangent and bitangent vertex attributes for the vertices that should not be bump mapped while also using a 1x1 "default" bump texture that will have no effect on the end result.
Does such "defualt" values exists? if not show should i do it?
Thnx in Advance!
If i had some surfaces that had bump mapping and some surfaces that dont how should i handle both of them in the same shader.
Currently i do so by using a flag. i sent a integer as a uniform and i branch the flow of the shader based on its value (0 or 1). but as i understand this is far from optimal.
Instead i thought i should always keep bump mapping "on" and then create "default" tangent and bitangent vertex attributes for the vertices that should not be bump mapped while also using a 1x1 "default" bump texture that will have no effect on the end result.
Does such "defualt" values exists? if not show should i do it?
Thnx in Advance!