What does this fragment shader line do?
col.rgb = 1.0 - col.rgb;
- Inverts the colour
- Darkens it by half
- Converts it to grey
- Clears it to black
Subtracting each channel from 1 maps black to white and every colour to its complement: a negative image.
Play Game Dev ▸