Since the last editor update, my custom textures that I input into my fragment shader is displayed as all black if I use the predefined textures in my material.
SCENE_TEXTURE is defined in my material as texture 0.
This code…
uniform lowp sampler2D SCENE_TEXTURE;
void main()
{
gl_FragColor = texture2D(SCENE_TEXTURE, var_texcoord0.xy);
}
…gets me a black screen (before the update it worked fine)
while this code…
uniform lowp sampler2D ANY_OTHER_NAME;
void main()
{
gl_FragColor = texture2D(ANY_OTHER_NAME, var_texcoord0.xy);
}
…using any name other than the ones defined in my material, draws the enabled texture as expected.
Is this related to the sampler-feature and if so, how do I unbreak my heart (code) ?
This is a simplified version of my shader for increased clarity. The original one uses two samplers to take in a scene texture and a shadow map that it blends together.