From 36d9fa90150d30a0a0851cc0da87531014c1d93d Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 21 Jun 2022 16:31:35 -0700 Subject: SL-17274: Add view_dir uniform --- indra/newview/pipeline.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 028a0db95c..1981f48500 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8596,6 +8596,12 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget *screen_target) soften_shader.uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0); soften_shader.uniform4fv(LLShaderMgr::LIGHTNORM, 1, environment.getClampedLightNorm().mV); + if(LLPipeline::sRenderPBR) + { + LLVector3 cameraAtAxis = LLViewerCamera::getInstance()->getAtAxis(); + soften_shader.uniform3fv(LLShaderMgr::DEFERRED_VIEW_DIR, 1, cameraAtAxis.mV); + } + { LLGLDepthTest depth(GL_FALSE); LLGLDisable blend(GL_BLEND); -- cgit v1.2.3