Updated fragment shaders' floating point comparisons and also some knock-on changes from SVN revision 246.

This commit is contained in:
Nik Henson 2012-02-13 23:51:32 +00:00
parent 8a4ea64994
commit 30130f2bd5
2 changed files with 4 additions and 4 deletions

View file

@ -111,7 +111,7 @@ void main(void)
float insideSpot;
// Get polygon color for untextured polygons (textured polygons will overwrite)
if (fsTexParams.x==0.0)
if (fsTexParams.x < 0.5)
fragColor = gl_Color;
else
// Textured polygons: set fragment color to texel value

View file

@ -111,7 +111,7 @@ void main(void)
float insideSpot;
// Get polygon color for untextured polygons (textured polygons will overwrite)
if (fsTexParams.x==0.0)
if (fsTexParams.x < 0.5)
fragColor = gl_Color;
else
// Textured polygons: set fragment color to texel value
@ -167,14 +167,14 @@ void main(void)
* When the alpha value is 0.0 (or close), pixels are discarded
* entirely.
*/
if (fsTexParams.y > 0.0) // contour processing enabled
if (fsTexParams.y > 0.5) // contour processing enabled
{
if (fragColor.a < 0.01) // discard anything with alpha == 0
discard;
}
// If contour texture and not discarded, force alpha to 1.0 because will later be modified by polygon translucency
if (fsTexFormat > 0.0) // contour (T1RGB5) texture map
if (fsTexFormat < 0.5) // contour (T1RGB5) texture map
fragColor.a = 1.0;
}