summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2018-09-17 16:40:25 +0300
committerruslantproductengine <ruslantproductengine@lindenlab.com>2018-09-17 16:40:25 +0300
commit609662dca5a9bdfeeaecfafc654e324e869335d0 (patch)
tree643b030bff39c743a504380bea1bfee408f992be /indra
parent32a147369e0f4979136b8d2a3fc57154a01c6935 (diff)
SL-1503 MAINT Objects do not rendering under water
Fixed.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewerdisplay.cpp4
-rw-r--r--indra/newview/pipeline.cpp24
2 files changed, 15 insertions, 13 deletions
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 86a9e7e2ad..64f6123f5d 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -689,7 +689,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
static LLCullResult result;
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
- LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
+ LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater();
gPipeline.updateCull(*LLViewerCamera::getInstance(), result, water_clip);
stop_glerror();
@@ -899,7 +899,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// gGL.popMatrix();
//}
- LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
+ LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater();
LLGLState::checkStates();
LLGLState::checkClientArrays();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5699d47ad8..dbb79e8e63 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2525,7 +2525,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
LLVOCachePartition* vo_part = region->getVOCachePartition();
if(vo_part)
{
- bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe/* && !gViewerWindow->getProgressView()->getVisible()*/;
+ bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe && 0 > water_clip /* && !gViewerWindow->getProgressView()->getVisible()*/;
vo_part->cull(camera, do_occlusion_cull);
}
}
@@ -9853,16 +9853,16 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gPipeline.grabReferences(result);
gPipeline.mDeferredScreen.bindTarget();
- gGL.setColorMask(true, true);
+ gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
gPipeline.mDeferredScreen.clear();
- renderGeomDeferred(camera);
+ renderGeomDeferred(camera);
}
else
{
- renderGeom(camera, TRUE);
- }
+ renderGeom(camera, TRUE);
+ }
gPipeline.popRenderTypeMask();
}
@@ -9880,6 +9880,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
S32 detail = RenderReflectionDetail;
if (detail > 0)
{ //mask out selected geometry based on reflection detail
+
if (detail < 4)
{
clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
@@ -9893,6 +9894,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
}
+
LLGLUserClipPlane clip_plane(plane, mat, projection);
LLGLDisable cull(GL_CULL_FACE);
updateCull(camera, ref_result, -water_clip, &plane);
@@ -9907,15 +9909,15 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLGLUserClipPlane clip_plane(plane, mat, projection);
if (LLPipeline::sRenderDeferred && materials_in_water)
- {
+ {
renderGeomDeferred(camera);
}
else
{
- renderGeom(camera);
+ renderGeom(camera);
+ }
}
- }
- }
+ }
if (LLPipeline::sRenderDeferred && materials_in_water)
{
@@ -9984,14 +9986,14 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLPipeline::sRenderDeferred && materials_in_water)
- {
+ {
mWaterDis.flush();
gPipeline.mDeferredScreen.bindTarget();
gGL.setColorMask(true, true);
glClearColor(0,0,0,0);
gPipeline.mDeferredScreen.clear();
gPipeline.grabReferences(result);
- renderGeomDeferred(camera);
+ renderGeomDeferred(camera);
}
else
{