]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
attempt to fix unintentionally forced gloss problems
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Sep 2007 19:23:39 +0000 (19:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Sep 2007 19:23:39 +0000 (19:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7588 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 5b13ce7b8330331741ed22e395766768c9e30e18..47b4c2653486ca6ee4b2079234e37de15792c671 100644 (file)
@@ -3835,9 +3835,9 @@ void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t)
 
        t->colormapping = VectorLength2(ent->colormap_pantscolor) + VectorLength2(ent->colormap_shirtcolor) >= (1.0f / 1048576.0f);
        t->basetexture = (!t->colormapping && t->currentskinframe->merged) ? t->currentskinframe->merged : t->currentskinframe->base;
-       t->glosstexture = r_texture_white;
+       t->glosstexture = r_texture_black;
        t->backgroundbasetexture = t->backgroundnumskinframes ? ((!t->colormapping && t->backgroundcurrentskinframe->merged) ? t->backgroundcurrentskinframe->merged : t->backgroundcurrentskinframe->base) : r_texture_white;
-       t->backgroundglosstexture = r_texture_white;
+       t->backgroundglosstexture = r_texture_black;
        t->specularpower = r_shadow_glossexponent.value;
        // TODO: store reference values for these in the texture?
        t->specularscale = 0;
@@ -3853,7 +3853,11 @@ void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t)
                        }
                }
                else if (r_shadow_gloss.integer >= 2 && r_shadow_gloss2intensity.value > 0)
+               {
+                       t->glosstexture = r_texture_white;
+                       t->backgroundglosstexture = r_texture_white;
                        t->specularscale = r_shadow_gloss2intensity.value;
+               }
        }
 
        // lightmaps mode looks bad with dlights using actual texturing, so turn