X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=r_shadow.c;h=4fc653445bc0065d32bc885b40cf827e06bb2130;hp=e6996fc17940780ece556f9369a24f70afaca7c8;hb=ed6a552a09b67a9499b772b7a60c4e425d7090a4;hpb=d0afea73454a0e381e2becf7e8c861c146908030 diff --git a/r_shadow.c b/r_shadow.c index e6996fc1..4fc65344 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -919,7 +919,7 @@ void R_Shadow_Stage_LightWithoutShadows(void) qglPolygonOffset(0, 0); //qglDisable(GL_POLYGON_OFFSET_FILL); GL_Color(1, 1, 1, 1); - GL_ColorMask(1, 1, 1, 1); + GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1); qglDepthFunc(GL_EQUAL); qglCullFace(GL_FRONT); // quake is backwards, this culls back faces qglEnable(GL_CULL_FACE); @@ -944,7 +944,7 @@ void R_Shadow_Stage_LightWithShadows(void) qglPolygonOffset(0, 0); //qglDisable(GL_POLYGON_OFFSET_FILL); GL_Color(1, 1, 1, 1); - GL_ColorMask(1, 1, 1, 1); + GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1); qglDepthFunc(GL_EQUAL); qglCullFace(GL_FRONT); // quake is backwards, this culls back faces qglEnable(GL_STENCIL_TEST); @@ -970,7 +970,7 @@ void R_Shadow_Stage_End(void) qglPolygonOffset(0, 0); //qglDisable(GL_POLYGON_OFFSET_FILL); GL_Color(1, 1, 1, 1); - GL_ColorMask(1, 1, 1, 1); + GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1); GL_Scissor(r_view_x, r_view_y, r_view_width, r_view_height); qglDepthFunc(GL_LEQUAL); qglCullFace(GL_FRONT); // quake is backwards, this culls back faces @@ -1579,7 +1579,7 @@ void R_Shadow_RenderLighting(int numverts, int numtriangles, const int *elements } // this final code is shared R_Mesh_State(&m); - GL_ColorMask(1,1,1,0); + GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 0); GL_BlendFunc(GL_DST_ALPHA, GL_ONE); VectorScale(lightcolor, colorscale, color2); for (renders = 0;renders < 64 && (color2[0] > 0 || color2[1] > 0 || color2[2] > 0);renders++, color2[0]--, color2[1]--, color2[2]--) @@ -1809,7 +1809,7 @@ void R_Shadow_RenderLighting(int numverts, int numtriangles, const int *elements } } R_Mesh_State(&m); - GL_ColorMask(1,1,1,0); + GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 0); GL_BlendFunc(GL_DST_ALPHA, GL_ONE); VectorScale(lightcolor, colorscale, color2); GL_LockArrays(0, numverts);