From 07bca31e06e4219401f82ae04539418c65e22ea8 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 10 Oct 2022 18:53:43 -0500 Subject: SL-18190 Fix alpha not playing nice with water surface by split LLDrawPoolAlpha into two passes, one above water, one below water, and clip against water plane. Currently brute forces two complete alpha passes, still need to cull against water plane and add support for fullbright shaders. --- indra/newview/lldrawpoolalpha.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'indra/newview/lldrawpoolalpha.h') diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h index fa8ef0f227..2c1ec30958 100644 --- a/indra/newview/lldrawpoolalpha.h +++ b/indra/newview/lldrawpoolalpha.h @@ -35,9 +35,13 @@ class LLFace; class LLColor4; class LLGLSLShader; -class LLDrawPoolAlpha: public LLRenderPass +class LLDrawPoolAlpha final: public LLRenderPass { public: + + // set by llsettingsvo so lldrawpoolalpha has quick access to the water plane in eye space + static LLVector4 sWaterPlane; + enum { VERTEX_DATA_MASK = LLVertexBuffer::MAP_VERTEX | @@ -47,7 +51,7 @@ public: }; virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; } - LLDrawPoolAlpha(U32 type = LLDrawPool::POOL_ALPHA); + LLDrawPoolAlpha(U32 type); /*virtual*/ ~LLDrawPoolAlpha(); /*virtual*/ S32 getNumPostDeferredPasses(); @@ -91,11 +95,4 @@ private: bool mRigged = false; }; -class LLDrawPoolAlphaPostWater : public LLDrawPoolAlpha -{ -public: - LLDrawPoolAlphaPostWater(); - virtual void render(S32 pass = 0); -}; - #endif // LL_LLDRAWPOOLALPHA_H -- cgit v1.2.3 From 830cb6b66551025285120fb628f0b5ebf3841756 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Feb 2023 17:18:39 -0600 Subject: SL-19148 Decruft some forward shaders and drawpools. Fix HUDs being in wrong color space. --- indra/newview/lldrawpoolalpha.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/lldrawpoolalpha.h') diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h index 2c1ec30958..b6cf54a7dd 100644 --- a/indra/newview/lldrawpoolalpha.h +++ b/indra/newview/lldrawpoolalpha.h @@ -58,7 +58,6 @@ public: /*virtual*/ void renderPostDeferred(S32 pass); /*virtual*/ S32 getNumPasses() { return 1; } - virtual void render(S32 pass = 0); void forwardRender(bool write_depth = false); /*virtual*/ void prerender(); -- cgit v1.2.3 From a2647e953aeee26ef99e62e0146adcd37c8afca1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 7 Feb 2023 18:25:22 -0600 Subject: SL-18229 Fix for PBR materials on HUDs misbehaving. Incidental decruft. --- indra/newview/lldrawpoolalpha.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/lldrawpoolalpha.h') diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h index b6cf54a7dd..1e10bb5566 100644 --- a/indra/newview/lldrawpoolalpha.h +++ b/indra/newview/lldrawpoolalpha.h @@ -77,6 +77,7 @@ private: LLGLSLShader* simple_shader = nullptr; LLGLSLShader* fullbright_shader = nullptr; LLGLSLShader* emissive_shader = nullptr; + LLGLSLShader* pbr_shader = nullptr; void drawEmissive(U32 mask, LLDrawInfo* draw); void renderEmissives(U32 mask, std::vector& emissives); -- cgit v1.2.3 From 577f6a46f02ecfa4efabc0b379e44e4f53a0b391 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 9 Feb 2023 17:00:36 -0600 Subject: SL-19181 Modulate "glow" by PBR emissive. --- indra/newview/lldrawpoolalpha.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/lldrawpoolalpha.h') diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h index 1e10bb5566..f2f802d85e 100644 --- a/indra/newview/lldrawpoolalpha.h +++ b/indra/newview/lldrawpoolalpha.h @@ -77,11 +77,14 @@ private: LLGLSLShader* simple_shader = nullptr; LLGLSLShader* fullbright_shader = nullptr; LLGLSLShader* emissive_shader = nullptr; + LLGLSLShader* pbr_emissive_shader = nullptr; LLGLSLShader* pbr_shader = nullptr; - void drawEmissive(U32 mask, LLDrawInfo* draw); - void renderEmissives(U32 mask, std::vector& emissives); - void renderRiggedEmissives(U32 mask, std::vector& emissives); + void drawEmissive(LLDrawInfo* draw); + void renderEmissives(std::vector& emissives); + void renderRiggedEmissives(std::vector& emissives); + void renderPbrEmissives(std::vector& emissives); + void renderRiggedPbrEmissives(std::vector& emissives); bool TexSetup(LLDrawInfo* draw, bool use_material); void RestoreTexSetup(bool tex_setup); -- cgit v1.2.3 From cae8aa6ecf231302653091162aa0e13e06c25696 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 18 May 2023 18:03:17 -0500 Subject: SL-19726 Fix for llTargetOmega on child prim breaking shadow rendering. Incidental decruft. --- indra/newview/lldrawpoolalpha.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lldrawpoolalpha.h') diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h index f2f802d85e..820c4f4e68 100644 --- a/indra/newview/lldrawpoolalpha.h +++ b/indra/newview/lldrawpoolalpha.h @@ -65,7 +65,7 @@ public: void renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE); void renderAlpha(U32 mask, bool depth_only = false, bool rigged = false); - void renderAlphaHighlight(U32 mask); + void renderAlphaHighlight(); bool uploadMatrixPalette(const LLDrawInfo& params); static BOOL sShowDebugAlpha; -- cgit v1.2.3