depth_shaders
depth_shaders copied to clipboard
How to invert white and black colors in the "Depth Shader Test (Fog)" shader?
I know this isn't an issue, but just wanted a way to contact you about this. I'm very new to GLSL, and have been trying to invert the white and black color ranges in that shader test to have a black fog with a white surrounding, how could I achieve this?
Sorry, didn't see this, but if you want to just invert the entire output color you can do
gl_FragColor = vec4(vec3(1.0) - col.rgb, col.a);
Alternatively, invert the depth at the top
depth = 1.0 - depth;