diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2022-11-02 12:20:05 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2022-11-02 12:20:05 -0400 |
commit | 7b35b7baea861ae58cd01826bb57fe995dc8aa52 (patch) | |
tree | d73198b7a3f55a3644f8b0faf60a0283d5a81f17 /indra/newview/lldrawpoolalpha.cpp | |
parent | 13456d01a71b873ed59e3839f817434357fc8da5 (diff) | |
parent | 15b5dedb2dc139c85461e7c867164b65cc6fc628 (diff) |
DRTVWR-575: Merge branch 'master' into fix-monterey
Diffstat (limited to 'indra/newview/lldrawpoolalpha.cpp')
-rw-r--r-- | indra/newview/lldrawpoolalpha.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index e674707c01..6c1abb24c9 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -58,6 +58,7 @@ static BOOL deferred_render = FALSE; // minimum alpha before discarding a fragment static const F32 MINIMUM_ALPHA = 0.004f; // ~ 1/255 + // minimum alpha before discarding a fragment when rendering impostors static const F32 MINIMUM_IMPOSTOR_ALPHA = 0.1f; @@ -147,6 +148,10 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass) (LLPipeline::sUnderWaterRender) ? &gDeferredAlphaWaterProgram : &gDeferredAlphaProgram; prepare_alpha_shader(simple_shader, false, true); //prime simple shader (loads shadow relevant uniforms) + for (int i = 0; i < LLMaterial::SHADER_COUNT; ++i) + { + prepare_alpha_shader(LLPipeline::sUnderWaterRender ? &gDeferredMaterialWaterProgram[i] : &gDeferredMaterialProgram[i], false, false); // note: bindDeferredShader will get called during render loop for materials + } // first pass, render rigged objects only and render to depth buffer forwardRender(true); @@ -215,9 +220,15 @@ void LLDrawPoolAlpha::render(S32 pass) { minimum_alpha = MINIMUM_IMPOSTOR_ALPHA; } + prepare_forward_shader(fullbright_shader, minimum_alpha); prepare_forward_shader(simple_shader, minimum_alpha); + for (int i = 0; i < LLMaterial::SHADER_COUNT; ++i) + { + prepare_forward_shader(LLPipeline::sUnderWaterRender ? &gDeferredMaterialWaterProgram[i] : &gDeferredMaterialProgram[i], minimum_alpha); + } + //first pass -- rigged only and drawn to depth buffer forwardRender(true); |