From 907140d248c4a45e61cb499f0cd2a38bff6f42d4 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Mon, 12 Apr 2021 16:04:10 -0700 Subject: SL-15110 Fix stars appearing in a different location in the night sky when ALM is turned on --- indra/newview/lldrawpoolwlsky.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 0c3d8f3098..c66aa905f5 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -340,6 +340,7 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const gGL.pushMatrix(); gGL.translatef(camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]); + gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f); gDeferredStarProgram.uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); if (LLPipeline::sReflectionRender) -- cgit v1.2.3 From ced2bd5ed4386d50231edfd1ebec01561f9b4465 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Mon, 12 Apr 2021 16:58:18 -0700 Subject: SL-14113 Fix moon haze --- indra/newview/lldrawpoolwlsky.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index c66aa905f5..436ecabd83 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -270,8 +270,8 @@ void LLDrawPoolWLSky::renderStars(const LLVector3& camPosLocal) const gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f); if (LLGLSLShader::sNoFixedFunction) { - gCustomAlphaProgram.bind(); - gCustomAlphaProgram.uniform1f(sCustomAlpha, star_alpha.mV[3]); + gStarsProgram.bind(); + gStarsProgram.uniform1f(sCustomAlpha, star_alpha.mV[3]); } else { @@ -288,7 +288,7 @@ void LLDrawPoolWLSky::renderStars(const LLVector3& camPosLocal) const if (LLGLSLShader::sNoFixedFunction) { - gCustomAlphaProgram.unbind(); + gStarsProgram.unbind(); // SL-14113 was gCustomAlphaProgram } else { @@ -477,7 +477,8 @@ void LLDrawPoolWLSky::renderSkyClouds(const LLVector3& camPosLocal, F32 camHeigh void LLDrawPoolWLSky::renderHeavenlyBodies() { - LLGLSPipelineBlendSkyBox gls_skybox(true, false); + //LLGLSPipelineBlendSkyBox gls_skybox(true, false); + LLGLSPipelineBlendSkyBox gls_skybox(true, true); // SL-14113 we need moon to write to depth to clip stars behind LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); gGL.pushMatrix(); @@ -607,8 +608,8 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) if (gPipeline.canUseWindLightShaders()) { renderSkyHazeDeferred(origin, camHeightLocal); - renderStarsDeferred(origin); renderHeavenlyBodies(); + renderStarsDeferred(origin); renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader); } gGL.setColorMask(true, true); @@ -626,8 +627,8 @@ void LLDrawPoolWLSky::render(S32 pass) LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); renderSkyHaze(origin, camHeightLocal); + renderHeavenlyBodies(); renderStars(origin); - renderHeavenlyBodies(); renderSkyClouds(origin, camHeightLocal, cloud_shader); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); -- cgit v1.2.3 From b6e576c7c2a1cb395092cc66b1836157872b131f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 11 Oct 2022 20:20:39 -0500 Subject: SL-18190 Cleanup -- convert some vec4's to vec3's (as they really are), remove some unused glsl files. --- indra/newview/lldrawpoolwlsky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 9873846669..7157214cbc 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -547,7 +547,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() F32 moon_brightness = (float)psky->getMoonBrightness(); moon_shader->uniform1f(LLShaderMgr::MOON_BRIGHTNESS, moon_brightness); - moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); + moon_shader->uniform3fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); //moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); moon_shader->uniform3fv(LLShaderMgr::DEFERRED_MOON_DIR, 1, psky->getMoonDirection().mV); // shader: moon_dir -- cgit v1.2.3 From 159d4f9cd0537cab5a87a873a172c571d02d4afc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 24 Nov 2022 22:31:20 +0200 Subject: SL-18708 Shutdown crash at renderHeavenlyBodies --- indra/newview/lldrawpoolwlsky.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 7157214cbc..6678e244b9 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -451,11 +451,13 @@ void LLDrawPoolWLSky::renderSkyClouds(const LLVector3& camPosLocal, F32 camHeigh void LLDrawPoolWLSky::renderHeavenlyBodies() { + if (!gSky.mVOSkyp) return; + LLGLSPipelineBlendSkyBox gls_skybox(true, false); LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); gGL.pushMatrix(); - gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); + gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]); LLFace * face = gSky.mVOSkyp->mFace[LLVOSky::FACE_SUN]; -- cgit v1.2.3 From 321c7895d00b0b88675c06b8f1cef063632fd686 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 1 Dec 2022 21:54:49 +0200 Subject: SL-18741 Basic bulk upload for gltf materials #1 --- indra/newview/lldrawpoolwlsky.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 4bd7536964..f09d1abe2d 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -166,6 +166,11 @@ void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLoca void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 camHeightLocal) const { + if (!gSky.mVOSkyp) + { + return; + } + LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) -- cgit v1.2.3 From 1d5332b23265f567e4b9ac5364c95f3837f63b71 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 2 Dec 2022 12:36:26 +0200 Subject: SL-18448 When initing views and object has pbr, open pbr in texture tab --- indra/newview/lldrawpoolwlsky.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index f09d1abe2d..c71d466830 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -283,6 +283,11 @@ void LLDrawPoolWLSky::renderStars(const LLVector3& camPosLocal) const void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const { + if (!gSky.mVOSkyp) + { + return; + } + LLGLSPipelineBlendSkyBox gls_sky(true, false); gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA); -- cgit v1.2.3 From 76c6f3f002693459b77669df39d51fb4e456650d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Dec 2022 21:18:42 +0200 Subject: SL-18741 Don't allow bulk upload without caps --- indra/newview/lldrawpoolwlsky.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index c71d466830..9fe1b64d3d 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -354,7 +354,7 @@ void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const { - if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp->getCloudNoiseTex()) + if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp && gSky.mVOSkyp->getCloudNoiseTex()) { LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); @@ -408,7 +408,7 @@ void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 void LLDrawPoolWLSky::renderSkyClouds(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const { - if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp->getCloudNoiseTex()) + if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp && gSky.mVOSkyp->getCloudNoiseTex()) { LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); -- cgit v1.2.3 From 830cb6b66551025285120fb628f0b5ebf3841756 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Feb 2023 17:18:39 -0600 Subject: SL-19148 Decruft some forward shaders and drawpools. Fix HUDs being in wrong color space. --- indra/newview/lldrawpoolwlsky.cpp | 191 +------------------------------------- 1 file changed, 2 insertions(+), 189 deletions(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 9fe1b64d3d..8023435eba 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -69,51 +69,14 @@ LLViewerTexture *LLDrawPoolWLSky::getDebugTexture() return NULL; } -void LLDrawPoolWLSky::beginRenderPass( S32 pass ) -{ - sky_shader = - LLPipeline::sUnderWaterRender ? - &gObjectFullbrightNoColorWaterProgram : - &gWLSkyProgram; - - cloud_shader = - LLPipeline::sUnderWaterRender ? - &gObjectFullbrightNoColorWaterProgram : - &gWLCloudProgram; - - sun_shader = - LLPipeline::sUnderWaterRender ? - &gObjectFullbrightNoColorWaterProgram : - &gWLSunProgram; - - moon_shader = - LLPipeline::sUnderWaterRender ? - &gObjectFullbrightNoColorWaterProgram : - &gWLMoonProgram; -} - -void LLDrawPoolWLSky::endRenderPass( S32 pass ) -{ - sky_shader = nullptr; - cloud_shader = nullptr; - sun_shader = nullptr; - moon_shader = nullptr; -} - void LLDrawPoolWLSky::beginDeferredPass(S32 pass) { sky_shader = &gDeferredWLSkyProgram; cloud_shader = &gDeferredWLCloudProgram; - sun_shader = - LLPipeline::sUnderWaterRender ? - &gObjectFullbrightNoColorWaterProgram : - &gDeferredWLSunProgram; + sun_shader = &gDeferredWLSunProgram; - moon_shader = - LLPipeline::sUnderWaterRender ? - &gObjectFullbrightNoColorWaterProgram : - &gDeferredWLMoonProgram; + moon_shader = &gDeferredWLMoonProgram; } void LLDrawPoolWLSky::endDeferredPass(S32 pass) @@ -124,11 +87,6 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass) moon_shader = nullptr; } -void LLDrawPoolWLSky::renderFsSky(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const -{ - gSky.mVOWLSkyp->drawFsSky(); -} - void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const { llassert_always(NULL != shader); @@ -213,74 +171,6 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca } } -void LLDrawPoolWLSky::renderSkyHaze(const LLVector3& camPosLocal, F32 camHeightLocal) const -{ - LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); - - if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) - { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - LLGLSPipelineDepthTestSkyBox sky(true, false); - sky_shader->bind(); - sky_shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, 1); - sky_shader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, psky->getSunMoonGlowFactor()); - renderDome(origin, camHeightLocal, sky_shader); - sky_shader->unbind(); - } -} - -void LLDrawPoolWLSky::renderStars(const LLVector3& camPosLocal) const -{ - LLGLSPipelineBlendSkyBox gls_skybox(true, false); - - // *NOTE: have to have bound the cloud noise texture already since register - // combiners blending below requires something to be bound - // and we might as well only bind once. - gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); - - // *NOTE: we divide by two here and GL_ALPHA_SCALE by two below to avoid - // clamping and allow the star_alpha param to brighten the stars. - LLColor4 star_alpha(LLColor4::black); - - star_alpha.mV[3] = LLEnvironment::instance().getCurrentSky()->getStarBrightness() / 512.f; - - // If star brightness is not set, exit - if( star_alpha.mV[3] < 0.001 ) - { - LL_DEBUGS("SKY") << "star_brightness below threshold." << LL_ENDL; - return; - } - - LLViewerTexture* tex_a = gSky.mVOSkyp->getBloomTex(); - LLViewerTexture* tex_b = gSky.mVOSkyp->getBloomTexNext(); - - if (tex_a && (!tex_b || (tex_a == tex_b))) - { - // Bind current and next sun textures - gGL.getTexUnit(0)->bind(tex_a); - } - else if (tex_b && !tex_a) - { - gGL.getTexUnit(0)->bind(tex_b); - } - else if (tex_b != tex_a) - { - gGL.getTexUnit(0)->bind(tex_a); - } - - gGL.pushMatrix(); - gGL.translatef(camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]); - gGL.rotatef(gFrameTimeSeconds*0.01f, 0.f, 0.f, 1.f); - gStarsProgram.bind(); - gStarsProgram.uniform1f(sCustomAlpha, star_alpha.mV[3]); - - gSky.mVOWLSkyp->drawStars(); - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.popMatrix(); - gStarsProgram.unbind(); // SL-14113 was gCustomAlphaProgram - } - void LLDrawPoolWLSky::renderStarsDeferred(const LLVector3& camPosLocal) const { if (!gSky.mVOSkyp) @@ -406,65 +296,10 @@ void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 } } -void LLDrawPoolWLSky::renderSkyClouds(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader* cloudshader) const -{ - if (gPipeline.canUseWindLightShaders() && gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS) && gSky.mVOSkyp && gSky.mVOSkyp->getCloudNoiseTex()) - { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - - LLGLSPipelineBlendSkyBox pipeline(true, true); - - cloudshader->bind(); - - LLPointer cloud_noise = gSky.mVOSkyp->getCloudNoiseTex(); - LLPointer cloud_noise_next = gSky.mVOSkyp->getCloudNoiseTexNext(); - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); - - F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f; - F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; - - // if we even have sun disc textures to work with... - if (cloud_noise || cloud_noise_next) - { - if (cloud_noise && (!cloud_noise_next || (cloud_noise == cloud_noise_next))) - { - // Bind current and next sun textures - cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); - blend_factor = 0; - } - else if (cloud_noise_next && !cloud_noise) - { - cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise_next, LLTexUnit::TT_TEXTURE); - blend_factor = 0; - } - else if (cloud_noise_next != cloud_noise) - { - cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP, cloud_noise, LLTexUnit::TT_TEXTURE); - cloudshader->bindTexture(LLShaderMgr::CLOUD_NOISE_MAP_NEXT, cloud_noise_next, LLTexUnit::TT_TEXTURE); - } - } - - cloudshader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); - cloudshader->uniform1f(LLShaderMgr::CLOUD_VARIANCE, cloud_variance); - cloudshader->uniform1f(LLShaderMgr::SUN_MOON_GLOW_FACTOR, psky->getSunMoonGlowFactor()); - - /// Render the skydome - renderDome(camPosLocal, camHeightLocal, cloudshader); - - cloudshader->unbind(); - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.getTexUnit(1)->unbind(LLTexUnit::TT_TEXTURE); - } -} - void LLDrawPoolWLSky::renderHeavenlyBodies() { if (!gSky.mVOSkyp) return; - //LLGLSPipelineBlendSkyBox gls_skybox(true, false); LLGLSPipelineBlendSkyBox gls_skybox(true, true); // SL-14113 we need moon to write to depth to clip stars behind LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); @@ -602,29 +437,7 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) gGL.setColorMask(true, true); } -void LLDrawPoolWLSky::render(S32 pass) -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY); - if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) - { - return; - } - const F32 camHeightLocal = LLEnvironment::instance().getCamHeight(); - LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); - - renderSkyHaze(origin, camHeightLocal); - renderHeavenlyBodies(); - renderStars(origin); - renderSkyClouds(origin, camHeightLocal, cloud_shader); - - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); -} - -void LLDrawPoolWLSky::prerender() -{ - //LL_INFOS() << "wlsky prerendering pass." << LL_ENDL; -} LLViewerTexture* LLDrawPoolWLSky::getTexture() { -- cgit v1.2.3 From 68c4ff7dce2bd519431238f6209238aba46dc0ba Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 14 Feb 2023 10:10:12 -0600 Subject: SL-18762 Fix for broken local lights on alpha when wearing a HUD attachment. Also fix stuck sun/moon and incidental decruft. --- indra/newview/lldrawpoolwlsky.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 8023435eba..59ed62f995 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -416,11 +416,14 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() void LLDrawPoolWLSky::renderDeferred(S32 pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_WL_SKY); - if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY)) + if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY) || gSky.mVOSkyp.isNull()) { return; } + // TODO: remove gSky.mVOSkyp and fold sun/moon into LLVOWLSky + gSky.mVOSkyp->updateGeometry(gSky.mVOSkyp->mDrawable); + const F32 camHeightLocal = LLEnvironment::instance().getCamHeight(); gGL.setColorMask(true, false); -- cgit v1.2.3 From e5a2f85005bbf94f39ef048dbfe43276990f1154 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 27 Feb 2023 16:53:56 -0600 Subject: SL-19226 Reimplement water fresnel offset/scale, exposure balance for midday, adjust reflections off, and decruft depth buffer error correction shenanigans that are no longer used. --- indra/newview/lldrawpoolwlsky.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 59ed62f995..acbc349567 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -45,6 +45,8 @@ #include "llvowlsky.h" #include "llsettingsvo.h" +extern BOOL gCubeSnapshot; + static LLStaticHashedString sCamPosLocal("camPosLocal"); static LLStaticHashedString sCustomAlpha("custom_alpha"); @@ -434,7 +436,10 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) { renderSkyHazeDeferred(origin, camHeightLocal); renderHeavenlyBodies(); - renderStarsDeferred(origin); + if (!gCubeSnapshot) + { + renderStarsDeferred(origin); + } renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader); } gGL.setColorMask(true, true); -- cgit v1.2.3 From 366bae14963151905cae7a08c4c77d422223b9e1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 27 Mar 2023 18:22:53 -0500 Subject: DRTVWR-559 Fix for off-white metal not looking chromed when it should (fake hacky HDR sky reflections). --- indra/newview/lldrawpoolwlsky.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index acbc349567..b49fe35851 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -139,6 +139,8 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca sky_shader->bind(); + sky_shader->uniform1i(LLShaderMgr::CUBE_SNAPSHOT, gCubeSnapshot ? 1 : 0); + LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); LLViewerTexture* rainbow_tex = gSky.mVOSkyp->getRainbowTex(); -- cgit v1.2.3 From de73cf7599e934441fe760f53163b0504c03adc7 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 7 Apr 2023 11:06:09 -0500 Subject: SL-19538 Remove clouds from irradiance maps and don't conflate max probe samples with max probe neighbors, and don't move manual probes after they are complete (removes flickering around Sponza). --- indra/newview/lldrawpoolwlsky.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index b49fe35851..820073b3e0 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -442,7 +442,11 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) { renderStarsDeferred(origin); } - renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader); + + if (!gCubeSnapshot || gPipeline.mReflectionMapManager.isRadiancePass()) // don't draw clouds in irradiance maps to avoid popping + { + renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader); + } } gGL.setColorMask(true, true); } -- cgit v1.2.3 From 086da3d6f8be0fd1e35fc7fc4438d832187c0b5e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 12 Apr 2023 09:55:00 -0500 Subject: DRTVWR-559 Make cloud pattern deterministic when cloud scroll is zero. --- indra/newview/lldrawpoolwlsky.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/lldrawpoolwlsky.cpp') diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index 820073b3e0..05ee328e43 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -265,6 +265,11 @@ void LLDrawPoolWLSky::renderSkyCloudsDeferred(const LLVector3& camPosLocal, F32 F32 cloud_variance = psky ? psky->getCloudVariance() : 0.0f; F32 blend_factor = psky ? psky->getBlendFactor() : 0.0f; + if (psky->getCloudScrollRate().isExactlyZero()) + { + blend_factor = 0.f; + } + // if we even have sun disc textures to work with... if (cloud_noise || cloud_noise_next) { -- cgit v1.2.3