]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
rewrote timing code, now a much better and very different sleeping method, no longer...
[xonotic/darkplaces.git] / gl_rmain.c
index 043a1a1a402e7689270a9332b5fa2eb8e9c3e8fd..4b68e50e6cca6ad9c64c3f297f4170dfab56fe1c 100644 (file)
@@ -863,17 +863,20 @@ void R_SetupSurfaceShader(const entity_render_t *ent, const texture_t *texture,
        }
        else
        {
-               if (modellighting)
-                       permutation |= SHADERPERMUTATION_MODE_LIGHTDIRECTION;
-               else if (r_glsl_deluxemapping.integer >= 1 && r_refdef.worldmodel && r_refdef.worldmodel->brushq3.deluxemapping && lightmaptexture)
+               if (!(texture->currentmaterialflags & MATERIALFLAG_FULLBRIGHT))
                {
-                       if (r_refdef.worldmodel->brushq3.deluxemapping_modelspace)
-                               permutation |= SHADERPERMUTATION_MODE_LIGHTDIRECTIONMAP_MODELSPACE;
-                       else
+                       if (modellighting)
+                               permutation |= SHADERPERMUTATION_MODE_LIGHTDIRECTION;
+                       else if (r_glsl_deluxemapping.integer >= 1 && r_refdef.worldmodel && r_refdef.worldmodel->brushq3.deluxemapping && lightmaptexture)
+                       {
+                               if (r_refdef.worldmodel->brushq3.deluxemapping_modelspace)
+                                       permutation |= SHADERPERMUTATION_MODE_LIGHTDIRECTIONMAP_MODELSPACE;
+                               else
+                                       permutation |= SHADERPERMUTATION_MODE_LIGHTDIRECTIONMAP_TANGENTSPACE;
+                       }
+                       else if (r_glsl_deluxemapping.integer >= 2) // fake mode
                                permutation |= SHADERPERMUTATION_MODE_LIGHTDIRECTIONMAP_TANGENTSPACE;
                }
-               else if (r_glsl_deluxemapping.integer >= 2) // fake mode
-                       permutation |= SHADERPERMUTATION_MODE_LIGHTDIRECTIONMAP_TANGENTSPACE;
                if (texture->skin.glow)
                        permutation |= SHADERPERMUTATION_GLOW;
        }