Actually for disabling textures in my fragment shader, I add this line before calculations:
if (tex_color.xyz == vec3 (.0,.0,.0))
tex_color = vec4 (1.,1.,1.,1.);
But, of course, this is very bad and this produces the normal lighting wherever the texture fragments are all black.
I could have a lot of geometry where some of them have textures and some others don’t. And I would like not to sort them regarding they have texture or not. And in another side, switching shaders too often might not be a good idea.
How do you manage textures in your shaders ? If you sort your geometry regarding texture, why, since it can break the depth sort, and other sorts. What do you suggest me to do ?
Thanks in advance.