- Home /
Question by
kvark · Mar 05, 2011 at 11:36 PM ·
custom-shaderglsl
Weird GLSL behavior
Hello,
I have a simple GLSL program:
varying highp vec3 normal;
#ifdef VERTEX
void main() {
normal = gl_Vertex.xyz;
gl_Position = ftransform();
}
#endif
#ifdef FRAGMENT
void main() {
gl_FragColor = vec4(normalize(normal),1.0);
}
#endif
When used on an object, I can see flickering of the color change when moving and rotating the camera in the editor. What am I doing wrong?
Environment: OS X 10.6.6, MacMini 2010 model
Edit-1. Shader compiles and links correctly (at least Unity doesn't report errors/warnings).
Comment