1#version 140 2 3in float d; 4in vec4 bigColor, smallColor; 5in vec4 otherColor; 6 7in float c; 8in vec4 BaseColor; 9 10void main() 11{ 12 vec4 color = BaseColor; 13 vec4 color2; 14 15 color2 = otherColor; 16 17 if (c > d) 18 color += bigColor; 19 else 20 color += smallColor; 21 22 gl_FragColor = color * color2; 23} 24