Open gsingh93 opened 9 years ago
For reference, here's the original shader:
#version 140
in vec3 v_coord;
out vec4 color;
void main() {
if (abs(v_coord.z) == 0.25) {
color = vec4(0., 1., 0., 1.);
} else if (abs(v_coord.x) == 0.25) {
color = vec4(0., 0., 1., 1.);
} else if (abs(v_coord.y) == 0.25) {
color = vec4(1., 0., 0., 1.);
}
}
To be clear, this happens at runtime when creating a Program
and unwrapping the result.
Am I doing something wrong here:
I get: