// Displays grey everywhere except for colours that are mostly red // Careful, this function takes a vec4 and a float. The float is the average colour - but doesn't have to be, feel free to mess around. vec4 rob(vec4 input_colour, float grey_colour) { vec4 returnCol = vec4(input_colour.r, grey_colour, grey_colour, 1.0); if (returnCol.r < returnCol.b || returnCol.r < returnCol.g) { returnCol.r = grey_colour; } return returnCol; }
|| returnCol.r < returnCol.b + returnCol.g
could be added to the if statement. "<" Could also be swapped for "<="