From 3494fa3cfe50a0152ff9f66885a17e0adbaaf221 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 2 Nov 2018 17:30:54 +0100 Subject: SL-9806 stop rendering stars post deferred so they can be depth sorted properly with clouds and heavenly bodies. --- indra/newview/lldrawpoolwlsky.cpp | 14 ++------------ indra/newview/lldrawpoolwlsky.h | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 1ea7cc446c..9ce7912c45 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -704,12 +704,14 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) if (gPipeline.useAdvancedAtmospherics()) { renderSkyHazeAdvanced(origin, camHeightLocal); + renderStarsDeferred(); renderHeavenlyBodies(); renderSkyCloudsAdvanced(origin, camHeightLocal, cloud_shader); } else { renderSkyHazeDeferred(origin, camHeightLocal); + renderStarsDeferred(); renderHeavenlyBodies(); renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader); } @@ -718,18 +720,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) gGL.setColorMask(true, true); } -void LLDrawPoolWLSky::renderPostDeferred(S32 pass) -{ - LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); - - LLGLSPipelineBlendSkyBox sky(true, false); - - gGL.pushMatrix(); - gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); - renderStarsDeferred(); - gGL.popMatrix(); -} - void LLDrawPoolWLSky::render(S32 pass) { if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h index 4338de32dc..e7b4726321 100644 --- a/indra/newview/lldrawpoolwlsky.h +++ b/indra/newview/lldrawpoolwlsky.h @@ -53,10 +53,10 @@ public: /*virtual*/ void renderDeferred(S32 pass); - /*virtual*/ S32 getNumPostDeferredPasses() { return 1; } + /*virtual*/ S32 getNumPostDeferredPasses() { return 0; } /*virtual*/ void beginPostDeferredPass(S32 pass) {} /*virtual*/ void endPostDeferredPass(S32 pass) {} - /*virtual*/ void renderPostDeferred(S32 pass); + /*virtual*/ void renderPostDeferred(S32 pass) {} /*virtual*/ LLViewerTexture *getDebugTexture(); /*virtual*/ void beginRenderPass( S32 pass ); -- cgit v1.2.3