Skip to content
Snippets Groups Projects
Commit b3e5fc41 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Tweaks n changes

parent d8c3856d
No related branches found
No related tags found
No related merge requests found
...@@ -1195,6 +1195,12 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh ...@@ -1195,6 +1195,12 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
bounds[0].add(*shift); bounds[0].add(*shift);
} }
F32 OCCLUSION_FUDGE_Z = SG_OCCLUSION_FUDGE; //<-- #Solution #2
if (LLDrawPool::POOL_WATER == mSpatialPartition->mDrawableType)
{
OCCLUSION_FUDGE_Z = 1.;
}
// Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension // Don't cull hole/edge water, unless we have the GL_ARB_depth_clamp extension
if (earlyFail(camera, bounds)) if (earlyFail(camera, bounds))
{ {
...@@ -1254,7 +1260,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh ...@@ -1254,7 +1260,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
shader->uniform3fv(LLShaderMgr::BOX_CENTER, 1, bounds[0].getF32ptr()); shader->uniform3fv(LLShaderMgr::BOX_CENTER, 1, bounds[0].getF32ptr());
shader->uniform3f(LLShaderMgr::BOX_SIZE, bounds[1][0]+SG_OCCLUSION_FUDGE, shader->uniform3f(LLShaderMgr::BOX_SIZE, bounds[1][0]+SG_OCCLUSION_FUDGE,
bounds[1][1]+SG_OCCLUSION_FUDGE, bounds[1][1]+SG_OCCLUSION_FUDGE,
bounds[1][2]+SG_OCCLUSION_FUDGE); bounds[1][2]+OCCLUSION_FUDGE_Z);
if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER) if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER)
{ {
......
...@@ -9447,6 +9447,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) ...@@ -9447,6 +9447,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
mWaterDis.bindTarget(); mWaterDis.bindTarget();
mWaterDis.getViewport(gGLViewport); mWaterDis.getViewport(gGLViewport);
gGL.setColorMask(true, true);
mWaterDis.clear();
gGL.setColorMask(true, false);
F32 water_dist = water_height * LLPipeline::sDistortionWaterClipPlaneMargin; F32 water_dist = water_height * LLPipeline::sDistortionWaterClipPlaneMargin;
//clip out geometry on the same side of water as the camera w/ enough margin to not include the water geo itself, //clip out geometry on the same side of water as the camera w/ enough margin to not include the water geo itself,
...@@ -9627,7 +9631,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera ...@@ -9627,7 +9631,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
LLGLEnable cull(GL_CULL_FACE); LLGLEnable cull(GL_CULL_FACE);
//enable depth clamping if available //enable depth clamping if available
//LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0); LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0);
if (use_shader) if (use_shader)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment