diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-05-02 11:52:45 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-05-02 11:52:45 -0500 | 
| commit | 1a6eee4ea27923016fac790b47161ce00f2c9b4f (patch) | |
| tree | 464a2d88704e180a44efbef357355ad486b89f7d /indra/newview | |
| parent | da6f4204b7b4887d519f66d586b2782fb6beff2e (diff) | |
SL-17321 Fix for some particle systems with custom blend functions not rendering.
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/lldrawpoolalpha.cpp | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index eebd89f77f..e674707c01 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -717,6 +717,16 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)  					LLGLEnableFunc stencil_test(GL_STENCIL_TEST, params.mSelected, &LLGLCommonFunc::selected_stencil_test);  					gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor); + +                    bool reset_minimum_alpha = false; +                    if (!LLPipeline::sImpostorRender && +                        params.mBlendFuncDst != LLRender::BF_SOURCE_ALPHA && +                        params.mBlendFuncSrc != LLRender::BF_SOURCE_ALPHA) +                    { // this draw call has a custom blend function that may require rendering of "invisible" fragments +                        current_shader->setMinimumAlpha(0.f); +                        reset_minimum_alpha = true; +                    } +                                          U32 drawMask = mask;                      if (params.mFullbright)                      { @@ -729,6 +739,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)                      params.mVertexBuffer->setBufferFast(drawMask);                      params.mVertexBuffer->drawRangeFast(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); + +                    if (reset_minimum_alpha) +                    { +                        current_shader->setMinimumAlpha(MINIMUM_ALPHA); +                    }  				}  				// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow).  Interleaving these state-changing calls is expensive, but glow must be drawn Z-sorted with alpha. | 
