stupid question in glsl why this line:
float x = 1 - gl_Color.x;
gives:
(26): error: Could not implicitly convert operands to arithmetic operator
GLSL (before #version 120) does not allow implicit conversions between integers and floating point. 1is an integer, and gl_Color.xis a float, so you get an error. You need
1
gl_Color.x
float x = 1.0 - gl_Color.x;
instead