I would like to achieve something like this :
However, I fail to get the Y coordinates (before projection) of a given point inside the Fragment Shader.
Here is my Fragment Shader :
precision mediump float;
vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);
vec4 pink = vec4(1.0, 0.0, 1.0, 1.0);
void main() {
float y_coordinates = ???
gl_FragColor = mix(blue , pink , y_coordinates);
}
Should I send them from the Vertex Shader?
