Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | RedCube |
I have tried for several hours to find how to make a sprite visible if not the light is hitting it. All I have come across is how to make it visible when light is hitting it.
if(AT_LIGHT_PASS==false)
COLOR = vec4(texture(TEXTURE, UV).rgb, 0.0);
}
I found out that this give me exactly what I don’t want but this:
if(AT_LIGHT_PASS==true)
COLOR = vec4(texture(TEXTURE, UV).rgb, 0.0);
}
don’t do anything at all.
I have been trying to learn shaders in the past but stopped because it’s so complex and there is almost no learning resources, do you know of any?
Btw I am using it for tilemap
Thanks for your time. And especially thanks for you if you know the answer