GL_BlendFunc(GL_ONE, GL_ZERO);
GL_DepthMask(false);
GL_DepthTest(true);
- if (!r_showtrispass)
- qglPolygonOffset(r_shadow_shadow_polygonfactor.value, r_shadow_shadow_polygonoffset.value);
- //if (r_shadow_shadow_polygonoffset.value != 0)
- //{
- // qglPolygonOffset(r_shadow_shadow_polygonfactor.value, r_shadow_shadow_polygonoffset.value);
- // qglEnable(GL_POLYGON_OFFSET_FILL);
- //}
- //else
- // qglDisable(GL_POLYGON_OFFSET_FILL);
+ qglPolygonOffset(r_shadowpolygonfactor, r_shadowpolygonoffset);
qglDepthFunc(GL_LESS);
qglCullFace(GL_FRONT); // quake is backwards, this culls back faces
qglEnable(GL_STENCIL_TEST);
GL_BlendFunc(GL_SRC_ALPHA, GL_ONE);
GL_DepthMask(false);
GL_DepthTest(true);
- if (!r_showtrispass)
- qglPolygonOffset(0, 0);
+ qglPolygonOffset(r_polygonfactor, r_polygonoffset);
//qglDisable(GL_POLYGON_OFFSET_FILL);
GL_Color(1, 1, 1, 1);
GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1);
GL_BlendFunc(GL_ONE, GL_ONE);
GL_DepthMask(false);
GL_DepthTest(!r_showdisabledepthtest.integer);
- if (!r_showtrispass)
- qglPolygonOffset(0, 0);
+ qglPolygonOffset(r_polygonfactor, r_polygonoffset);
GL_Color(0.0, 0.0125, 0.1, 1);
GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1);
qglDepthFunc(GL_GEQUAL);
GL_BlendFunc(GL_ONE, GL_ONE);
GL_DepthMask(false);
GL_DepthTest(!r_showdisabledepthtest.integer);
- if (!r_showtrispass)
- qglPolygonOffset(0, 0);
+ qglPolygonOffset(r_polygonfactor, r_polygonoffset);
GL_Color(0.1, 0.0125, 0, 1);
GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1);
if (transparent)
GL_BlendFunc(GL_ONE, GL_ZERO);
GL_DepthMask(true);
GL_DepthTest(true);
- if (!r_showtrispass)
- qglPolygonOffset(0, 0);
+ qglPolygonOffset(r_polygonfactor, r_polygonoffset);
//qglDisable(GL_POLYGON_OFFSET_FILL);
GL_Color(1, 1, 1, 1);
GL_ColorMask(r_refdef.colormask[0], r_refdef.colormask[1], r_refdef.colormask[2], 1);
}
}
- Con_DPrintf("static light built: %f %f %f : %f %f %f box, %i shadow volume triangles (in %i meshes)\n", rtlight->cullmins[0], rtlight->cullmins[1], rtlight->cullmins[2], rtlight->cullmaxs[0], rtlight->cullmaxs[1], rtlight->cullmaxs[2], shadowtris, shadowmeshes);
+ if (developer.integer >= 10)
+ Con_Printf("static light built: %f %f %f : %f %f %f box, %i shadow volume triangles (in %i meshes)\n", rtlight->cullmins[0], rtlight->cullmins[1], rtlight->cullmins[2], rtlight->cullmaxs[0], rtlight->cullmaxs[1], rtlight->cullmaxs[2], shadowtris, shadowmeshes);
}
void R_RTLight_Uncompile(rtlight_t *rtlight)
void R_Shadow_DrawEntityLight(entity_render_t *ent, int numsurfaces, int *surfacelist)
{
+ if (!ent->model->DrawLight)
+ return;
R_Shadow_SetupEntityLight(ent);
if (ent == r_refdef.worldentity)
ent->model->DrawLight(ent, numsurfaces, surfacelist);