From 326e20b0e5cd8e30d4b52c662a29aa2fc816b40d Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 10 Jul 2013 09:47:46 -0700 Subject: NORSPEC-291 WIP materials underwater w and wo alpha, water fog color broken, no refl, no water dis --- indra/newview/lldrawpoolmaterials.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolmaterials.cpp') diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index 08a36bddf1..49619e6b1d 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -71,7 +71,15 @@ void LLDrawPoolMaterials::beginDeferredPass(S32 pass) 15, //LLRenderPass::PASS_NORMSPEC_GLOW, }; - mShader = &(gDeferredMaterialProgram[shader_idx[pass]]); + if (LLPipeline::sUnderWaterRender) + { + mShader = &(gDeferredMaterialWaterProgram[shader_idx[pass]]); + } + else + { + mShader = &(gDeferredMaterialProgram[shader_idx[pass]]); + } + mShader->bind(); diffuse_channel = mShader->enableTexture(LLShaderMgr::DIFFUSE_MAP); -- cgit v1.2.3 From fbf3d8b78137a5229ccfabd1e42a0712d92b061f Mon Sep 17 00:00:00 2001 From: "Graham Madarasz (Graham)" Date: Thu, 11 Jul 2013 16:21:23 -0700 Subject: NORSPEC-291 WIP materials underwater with haze, reflection broken, water dist broken --- indra/newview/lldrawpoolmaterials.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/lldrawpoolmaterials.cpp') diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index 49619e6b1d..d1b5080650 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -71,15 +71,13 @@ void LLDrawPoolMaterials::beginDeferredPass(S32 pass) 15, //LLRenderPass::PASS_NORMSPEC_GLOW, }; + mShader = &(gDeferredMaterialProgram[shader_idx[pass]]); + if (LLPipeline::sUnderWaterRender) { mShader = &(gDeferredMaterialWaterProgram[shader_idx[pass]]); } - else - { - mShader = &(gDeferredMaterialProgram[shader_idx[pass]]); - } - + mShader->bind(); diffuse_channel = mShader->enableTexture(LLShaderMgr::DIFFUSE_MAP); @@ -223,3 +221,4 @@ void LLDrawPoolMaterials::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, gGL.matrixMode(LLRender::MM_MODELVIEW); } } + -- cgit v1.2.3