X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=r_shadow.c;h=7c23361bc73c8af913057b5a886c39d9c0b2aa33;hp=dcb5104d82db9f2ef42d639fd2fc1329237f1a58;hb=365e221966b15c24c6e2f4cbb6e619b0db443ebf;hpb=81428659a4156981ed76f6167ef3be82d35a4bf8 diff --git a/r_shadow.c b/r_shadow.c index dcb5104d..7c23361b 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -372,7 +372,7 @@ static void R_Shadow_SetShadowMode(void) } if(R_CompileShader_CheckStaticParms()) - R_GLSL_Restart_f(&cmd_client); + R_GLSL_Restart_f(cmd_local); } qbool R_Shadow_ShadowMappingEnabled(void) @@ -597,7 +597,7 @@ static void r_shadow_newmap(void) if (r_editlights_sprcubemapnoshadowlight) { R_SkinFrame_MarkUsed(r_editlights_sprcubemapnoshadowlight); } if (r_editlights_sprselection) { R_SkinFrame_MarkUsed(r_editlights_sprselection); } if (strncmp(cl.worldname, r_shadow_mapname, sizeof(r_shadow_mapname))) - R_Shadow_EditLights_Reload_f(&cmd_client); + R_Shadow_EditLights_Reload_f(cmd_local); } void R_Shadow_Init(void) @@ -2023,7 +2023,7 @@ static void R_Shadow_BounceGrid_AssignPhotons_Task(taskqueue_task_t *t) continue; } // skip if expanded light box is offscreen - if (R_CullBox(cullmins, cullmaxs)) + if (R_CullFrustum(cullmins, cullmaxs)) continue; // skip if overall light intensity is zero if (w * VectorLength2(rtlight->color) == 0.0f) @@ -2636,7 +2636,7 @@ static void R_Shadow_BounceGrid_TracePhotons_Shot(r_shadow_bouncegrid_photon_t * if ((remainingbounces == r_shadow_bouncegrid_state.settings.maxbounce || r_shadow_bouncegrid_state.settings.includedirectlighting) && p->numpaths < PHOTON_MAX_PATHS) { qbool notculled = true; - // cull paths that fail R_CullBox in dynamic mode + // cull paths that fail R_CullFrustum in dynamic mode if (!r_shadow_bouncegrid_state.settings.staticmode && r_shadow_bouncegrid_dynamic_culllightpaths.integer) { @@ -2647,7 +2647,7 @@ static void R_Shadow_BounceGrid_TracePhotons_Shot(r_shadow_bouncegrid_photon_t * cullmaxs[0] = max(shotstart[0], shothit[0]) + r_shadow_bouncegrid_state.settings.spacing[0] + r_shadow_bouncegrid_state.settings.lightpathsize; cullmaxs[1] = max(shotstart[1], shothit[1]) + r_shadow_bouncegrid_state.settings.spacing[1] + r_shadow_bouncegrid_state.settings.lightpathsize; cullmaxs[2] = max(shotstart[2], shothit[2]) + r_shadow_bouncegrid_state.settings.spacing[2] + r_shadow_bouncegrid_state.settings.lightpathsize; - if (R_CullBox(cullmins, cullmaxs)) + if (R_CullFrustum(cullmins, cullmaxs)) notculled = false; } if (notculled) @@ -3507,7 +3507,7 @@ static void R_Shadow_PrepareLight(rtlight_t *rtlight) } // skip if the light box is off screen - if (R_CullBox(rtlight->cullmins, rtlight->cullmaxs)) + if (R_CullFrustum(rtlight->cullmins, rtlight->cullmaxs)) return; // in the typical case this will be quickly replaced by GetLightInfo @@ -3546,7 +3546,7 @@ static void R_Shadow_PrepareLight(rtlight_t *rtlight) shadowtrispvs = r_shadow_buffer_shadowtrispvs; lighttrispvs = r_shadow_buffer_lighttrispvs; // if the reduced leaf bounds are offscreen, skip it - if (R_CullBox(rtlight->cached_cullmins, rtlight->cached_cullmaxs)) + if (R_CullFrustum(rtlight->cached_cullmins, rtlight->cached_cullmaxs)) return; } else @@ -3587,7 +3587,7 @@ static void R_Shadow_PrepareLight(rtlight_t *rtlight) continue; // skip the object entirely if it is not within the valid // shadow-casting region (which includes the lit region) - if (R_CullBoxCustomPlanes(ent->mins, ent->maxs, rtlight->cached_numfrustumplanes, rtlight->cached_frustumplanes)) + if (R_CullBox(ent->mins, ent->maxs, rtlight->cached_numfrustumplanes, rtlight->cached_frustumplanes)) continue; if (!(model = ent->model)) continue; @@ -5742,7 +5742,7 @@ static void R_Shadow_EditLights_EditAll_f(cmd_state_t *cmd) if (!light) continue; R_Shadow_SelectLight(light); - R_Shadow_EditLights_Edit_f(&cmd_client); + R_Shadow_EditLights_Edit_f(cmd_local); } // return to old selected (to not mess editing once selection is locked) R_Shadow_SelectLight(oldselected);