1
0
Fork 0

Discard cloud fragments with a transparency >98%

This commit is contained in:
Stuart Buchanan 2012-12-16 22:16:16 +00:00
parent e9a40e7a79
commit 024f7494e4
2 changed files with 4 additions and 1 deletions

View file

@ -6,6 +6,9 @@ varying vec3 hazeColor;
void main(void)
{
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
if (base.a < 0.02)
discard;
vec4 finalColor = base * gl_Color;
gl_FragColor.rgb = mix(hazeColor, finalColor.rgb, fogFactor );

View file

@ -4,7 +4,7 @@ varying float fogFactor;
void main(void)
{
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
if (base.a <= 0.01)
if (base.a < 0.02)
discard;
vec4 finalColor = base * gl_Color;