diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-09-28 21:04:56 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-09-28 21:04:56 -0600 |
commit | 9405ec62512ca7195905644d9c7f271ae01662c5 (patch) | |
tree | bbd430684af02f54da7713f60ca3ecac77246901 /progs/demos | |
parent | fc38c827716d333c92017348add1e80ea78af948 (diff) |
temporary hack to test nested conditionals
Diffstat (limited to 'progs/demos')
-rw-r--r-- | progs/demos/arbfslight.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/progs/demos/arbfslight.c b/progs/demos/arbfslight.c index 69575f0623..39c9226b3d 100644 --- a/progs/demos/arbfslight.c +++ b/progs/demos/arbfslight.c @@ -208,7 +208,21 @@ static void Init (void) " // Compute dot product of light direction and normal vector\n" " float dotProd = max (dot (lightPos, normalize (normal)), 0.0);\n" " // Compute diffuse and specular contributions\n" +#if 0 " gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n" +#else + " if (normal.y > 0.0) { \n" + " gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n" + " } \n" + " else { \n" + " if (normal.x < 0.0) { \n" + " gl_FragColor = vec4(1, 0, 0, 0); \n" + " } \n" + " else { \n" + " gl_FragColor = vec4(1, 1, 0, 0); \n" + " } \n" + " } \n" +#endif "}\n" ; static const char *vertShaderText = |