diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-02 22:20:59 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-02 22:20:59 +0300 |
commit | c6e310c7c2debb87e17d529e4d69b90049ad156f (patch) | |
tree | e6ab7d14b0bb7ec30115fcbc17311a25390532b8 /indra/newview/pipeline.cpp | |
parent | 580b35c8ea59187d5197e712022b706df3655f86 (diff) | |
parent | 5cf18cb867be567bf921f0b94a78fd822e4112ad (diff) |
Merged in lindenlab/viewer-release
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 c7626304ed..d0cd8f77aa 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 { |