renamed a parameter, removed some unused cvars
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Dec 2009 16:00:19 +0000 (16:00 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Dec 2009 16:00:19 +0000 (16:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9672 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c
r_shadow.c
r_shadow.h

index a3d9647..f5fe469 100644 (file)
@@ -790,8 +790,6 @@ static void R_Q1BSP_RecursiveGetLightInfo(r_q1bsp_getlightinfo_t *info, mnode_t
                                                {
                                                        if (info->svbsp_insertoccluder)
                                                        {
-                                                               if (!(currentmaterialflags & MATERIALFLAG_NOCULLFACE) && r_shadow_frontsidecasting.integer != PointInfrontOfTriangle(info->relativelightorigin, v[0], v[1], v[2]))
-                                                                       continue;
                                                                if (currentmaterialflags & MATERIALFLAG_NOSHADOW)
                                                                        continue;
                                                                VectorCopy(v[0], v2[0]);
@@ -1172,7 +1170,7 @@ static void R_Q1BSP_DrawLight_TransparentCallback(const entity_render_t *ent, co
 #define RSURF_MAX_BATCHSURFACES 8192
 
 extern qboolean r_shadow_usingdeferredprepass;
-void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surfacelist, const unsigned char *trispvs)
+void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surfacelist, const unsigned char *lighttrispvs)
 {
        dp_model_t *model = ent->model;
        const msurface_t *surface;
@@ -1243,9 +1241,9 @@ void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surface
                                RSurf_PrepareVerticesForBatch(true, true, 1, &surface);
                                for (m = surface->num_firsttriangle, mend = m + surface->num_triangles;m < mend;m++)
                                {
-                                       if (trispvs)
+                                       if (lighttrispvs && r_test.integer)
                                        {
-                                               if (!CHECKPVSBIT(trispvs, m))
+                                               if (!CHECKPVSBIT(lighttrispvs, m))
                                                {
                                                        usebufferobject = false;
                                                        continue;
index 92eaf99..16ee688 100644 (file)
@@ -286,7 +286,6 @@ cvar_t r_shadow_lightattenuationdividebias = {0, "r_shadow_lightattenuationdivid
 cvar_t r_shadow_lightattenuationlinearscale = {0, "r_shadow_lightattenuationlinearscale", "2", "changes attenuation texture generation"};
 cvar_t r_shadow_lightintensityscale = {0, "r_shadow_lightintensityscale", "1", "renders all world lights brighter or darker"};
 cvar_t r_shadow_lightradiusscale = {0, "r_shadow_lightradiusscale", "1", "renders all world lights larger or smaller"};
-cvar_t r_shadow_portallight = {0, "r_shadow_portallight", "1", "use portal culling to exactly determine lit triangles when compiling world lights"};
 cvar_t r_shadow_projectdistance = {0, "r_shadow_projectdistance", "0", "how far to cast shadows"};
 cvar_t r_shadow_frontsidecasting = {0, "r_shadow_frontsidecasting", "1", "whether to cast shadows from illuminated triangles (front side of model) or unlit triangles (back side of model)"};
 cvar_t r_shadow_realtime_dlight = {CVAR_SAVE, "r_shadow_realtime_dlight", "1", "enables rendering of dynamic lights such as explosions and rocket light"};
@@ -680,7 +679,6 @@ void R_Shadow_Init(void)
        Cvar_RegisterVariable(&r_shadow_lightattenuationlinearscale);
        Cvar_RegisterVariable(&r_shadow_lightintensityscale);
        Cvar_RegisterVariable(&r_shadow_lightradiusscale);
-       Cvar_RegisterVariable(&r_shadow_portallight);
        Cvar_RegisterVariable(&r_shadow_projectdistance);
        Cvar_RegisterVariable(&r_shadow_frontsidecasting);
        Cvar_RegisterVariable(&r_shadow_realtime_dlight);
@@ -3392,7 +3390,7 @@ void R_Shadow_SetupEntityLight(const entity_render_t *ent)
        Matrix4x4_Transform(&ent->inversematrix, rsurface.rtlight->shadoworigin, rsurface.entitylightorigin);
 }
 
-void R_Shadow_DrawWorldLight(int numsurfaces, int *surfacelist, const unsigned char *trispvs)
+void R_Shadow_DrawWorldLight(int numsurfaces, int *surfacelist, const unsigned char *lighttrispvs)
 {
        if (!r_refdef.scene.worldmodel->DrawLight)
                return;
@@ -3405,7 +3403,7 @@ void R_Shadow_DrawWorldLight(int numsurfaces, int *surfacelist, const unsigned c
        Matrix4x4_Concat(&rsurface.entitytoattenuationz, &matrix_attenuationz, &rsurface.entitytolight);
        VectorCopy(rsurface.rtlight->shadoworigin, rsurface.entitylightorigin);
 
-       r_refdef.scene.worldmodel->DrawLight(r_refdef.scene.worldentity, numsurfaces, surfacelist, trispvs);
+       r_refdef.scene.worldmodel->DrawLight(r_refdef.scene.worldentity, numsurfaces, surfacelist, lighttrispvs);
 
        rsurface.entity = NULL; // used only by R_GetCurrentTexture and RSurf_ActiveWorldEntity/RSurf_ActiveModelEntity
 }
index 1c11ae8..a34e624 100644 (file)
@@ -17,7 +17,6 @@ extern cvar_t r_shadow_lightattenuationpower;
 extern cvar_t r_shadow_lightattenuationscale;
 extern cvar_t r_shadow_lightintensityscale;
 extern cvar_t r_shadow_lightradiusscale;
-extern cvar_t r_shadow_portallight;
 extern cvar_t r_shadow_projectdistance;
 extern cvar_t r_shadow_frontsidecasting;
 extern cvar_t r_shadow_realtime_dlight;
@@ -34,7 +33,6 @@ extern cvar_t r_shadow_realtime_world_compileportalculling;
 extern cvar_t r_shadow_scissor;
 extern cvar_t r_shadow_polygonfactor;
 extern cvar_t r_shadow_polygonoffset;
-extern cvar_t r_shadow_singlepassvolumegeneration;
 extern cvar_t r_shadow_texture3d;
 extern cvar_t gl_ext_separatestencil;
 extern cvar_t gl_ext_stenciltwoside;