diff options
author | Graham Linden <graham@lindenlab.com> | 2019-04-29 11:11:05 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-04-29 11:11:05 -0700 |
commit | 0f83696585b8810c24d535432716215caf0c21e9 (patch) | |
tree | 25bcabd6ae10702922e887c701cde9eaf1a07335 /indra/newview/pipeline.cpp | |
parent | eff7acfb1caaa092a88555fca752dc9aea11625e (diff) |
SL-10956, SL-10969
Don't ignore far z in culling.
Fix Mid lighting being very dark.
Partial fix for broken projectors with forward rendering.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index eb6a2edcec..95ee1ef488 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2426,10 +2426,6 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl camera.disableUserClipPlane(); - bool use_far_clip = LLPipeline::sUseFarClip; - - LLPipeline::sUseFarClip = false; - for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) { @@ -2456,15 +2452,11 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl } } - LLPipeline::sUseFarClip = use_far_clip; - if (bound_shader) { gOcclusionCubeProgram.unbind(); } - camera.disableUserClipPlane(); - if (hasRenderType(LLPipeline::RENDER_TYPE_SKY) && gSky.mVOSkyp.notNull() && gSky.mVOSkyp->mDrawable.notNull()) @@ -10288,7 +10280,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) //far_clip = llmin(far_clip, 128.f); far_clip = llmin(far_clip, camera.getFar()); - far_clip = llmax(far_clip, 256.0f); + //far_clip = llmax(far_clip, 256.0f); F32 range = far_clip-near_clip; @@ -10648,11 +10640,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera) set_current_modelview(view[j]); set_current_projection(proj[j]); - LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE); - - //shadow_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR); + shadow_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR); shadow_cam.getAgentPlane(LLCamera::AGENT_PLANE_NEAR).set(shadow_near_clip); + LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE); + //translate and scale to from [-1, 1] to [0, 1] glh::matrix4f trans(0.5f, 0.f, 0.f, 0.5f, 0.f, 0.5f, 0.f, 0.5f, |