From: havoc Date: Thu, 9 Feb 2006 13:52:17 +0000 (+0000) Subject: added diffuse texture alpha support to GLSL shader (dot3 and vertex still need updating) X-Git-Tag: xonotic-v0.1.0preview~4351 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=f15550a0c2f75decb170a7395265d13086fa8624;p=xonotic%2Fdarkplaces.git added diffuse texture alpha support to GLSL shader (dot3 and vertex still need updating) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5958 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index 8eb69cbf..ad68adb7 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -434,7 +434,9 @@ const char *builtinshader_light_frag = "\n" " // calculate shading\n" " myhvec3 diffusenormal = myhvec3(normalize(LightVector));\n" -" myhvec3 color = myhvec3(texture2D(Texture_Color, TexCoord));\n" +" myhvec4 texturecolor = myhvec4(texture2D(Texture_Color, TexCoord));\n" +" colorscale *= texturecolor.a;\n" +" myhvec3 color = myhvec3(texturecolor);\n" "#ifdef USECOLORMAPPING\n" " color += myhvec3(texture2D(Texture_Pants, TexCoord)) * Color_Pants + myhvec3(texture2D(Texture_Shirt, TexCoord)) * Color_Shirt;\n" "#endif\n"