Hi everone!
I have this code here:
uniform int something;
varying vec2 texcoord;
void main()
{
vec4 tex = texture2D ( img, texcoord );
if(something)
{
if( tex.a == 0.0 ) discard;
}
gl_FragColor = tex;
}
I was wondering, is
if(something) called every time it renders pixels?
To think logically, the variable something doens't change so it doesn't have to check it everytime. It just have to check it when im activating this shader right?
Thanks!