#version 120 // uniform data uniform sampler2D texture_sampler; // in varying vec2 frag_uv; varying vec3 frag_normal; void main() { if (frag_normal.x > 0.0 || frag_normal.z < 0.0 || frag_normal.y < 0.0) { gl_FragColor = texture2D(texture_sampler, frag_uv) * vec4(0.85, 0.85, 0.85, 1.0); } else { gl_FragColor = texture2D(texture_sampler, frag_uv); } //gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); }