$ ./guess_the_languageGame Dev
Game Dev · easy · #255

What does this fragment shader line do?

col.rgb = 1.0 - col.rgb;
  1. Inverts the colour
  2. Darkens it by half
  3. Converts it to grey
  4. 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 ▸