summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwlsky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolwlsky.cpp')
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 025a4c86e5..e6306b391a 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -48,6 +48,7 @@ static LLStaticHashedString sCamPosLocal("camPosLocal");
static LLStaticHashedString sCustomAlpha("custom_alpha");
static LLGLSLShader* cloud_shader = NULL;
+static LLGLSLShader* cloud_shadow_shader = NULL;
static LLGLSLShader* sky_shader = NULL;
static LLGLSLShader* sun_shader = NULL;
static LLGLSLShader* moon_shader = NULL;
@@ -123,6 +124,29 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass)
moon_shader = nullptr;
}
+S32 LLDrawPoolWLSky::getNumShadowPasses() { return 0; }
+
+void LLDrawPoolWLSky::beginShadowPass(S32 pass)
+{
+ cloud_shadow_shader = LLPipeline::sRenderDeferred ? &gDeferredWLCloudShadowProgram : &gWLCloudShadowProgram;
+}
+
+void LLDrawPoolWLSky::endShadowPass(S32 pass)
+{
+ cloud_shadow_shader = nullptr;
+}
+
+void LLDrawPoolWLSky::renderShadow(S32 pass)
+{
+ if (cloud_shadow_shader)
+ {
+ const F32 camHeightLocal = LLEnvironment::instance().getCamHeight();
+ LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
+
+ renderSkyClouds(origin, camHeightLocal, cloud_shadow_shader);
+ }
+}
+
void LLDrawPoolWLSky::renderFsSky(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const
{
gSky.mVOWLSkyp->drawFsSky();