1
0
Fork 0
Commit graph

6 commits

Author SHA1 Message Date
Tim Moore
d27174028e shader optimizations
Use two-pass rendering for some shaders to reduce the cost of expensive shaders.

Implement some material animations using a shader uniform.

Eliminate use of gl_FrontFacing. It's too buggy on ATI/ Macintosh.
2010-08-14 00:13:16 +02:00
timoore
421ee253e6 fix shader bugs on ATI hardware
The main problem was using gl_FrontMaterial.ambient with a color mode
of AMBIENT_AND_DIFFUSE i.e., the fixed function path would take both the
ambient colors from the vertex color value. Also, some vertex shaders
were not writing gl_FrontColor even though the fragment shader was
accessing gl_Color.


Author: Tim Moore <timoore@redhat.com>
2010-02-12 11:38:53 +00:00
timoore
971b6c3ef2 light two-sided polygons
Also, remove model-default.frag; for the moment one fragment shader works for
both terrain and models.


Author: Tim Moore <timoore@redhat.com>
2009-11-19 16:20:51 +00:00
timoore
ca82d06aef in shaders, get alpha directly from diffuse material value
Just like the fixed function pipeline


Author: Tim Moore <timoore@redhat.com>
2009-11-17 06:23:21 +00:00
timoore
30f844c961 fixes to terrain shader
Handle emission and light model ambient value.

Test if shininess is 0 to avoid pow(0, 0), which is undefined.
2009-07-19 18:54:10 +00:00
timoore
d4d89d2793 Terrain effect has a shader 2009-07-15 22:49:36 +00:00