diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-02 22:12:55 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-02 22:12:55 +0300 |
commit | 65bf63c973caa388c33dd02470b1cf4c818834e2 (patch) | |
tree | b66489b924a5418425fbffbc50d43bcb5916c7b4 /indra/newview/pipeline.cpp | |
parent | eb6a7cde9d08215f18b9b9c707f39f73b60403a8 (diff) | |
parent | 5cf18cb867be567bf921f0b94a78fd822e4112ad (diff) |
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 40d6d325ba..e8c9909f8c 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); } } @@ -2654,9 +2654,12 @@ void LLPipeline::downsampleDepthBuffer(LLRenderTarget& source, LLRenderTarget& d if (scratch_space) { + GLint bits = 0; + bits |= (source.hasStencil() && dest.hasStencil()) ? GL_STENCIL_BUFFER_BIT : 0; + bits |= GL_DEPTH_BUFFER_BIT; scratch_space->copyContents(source, 0, 0, source.getWidth(), source.getHeight(), - 0, 0, scratch_space->getWidth(), scratch_space->getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST); + 0, 0, scratch_space->getWidth(), scratch_space->getHeight(), bits, GL_NEAREST); } dest.bindTarget(); @@ -9866,16 +9869,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(); } @@ -9893,6 +9896,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); @@ -9906,6 +9910,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); @@ -9920,15 +9925,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) { @@ -9997,14 +10002,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 { |