summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-02-02 10:48:15 -0600
committerDave Parks <davep@lindenlab.com>2023-02-02 10:48:15 -0600
commit4694a46f7bbbb5ec57d4695d13e0a557b1d094da (patch)
treeedede08e0dd6535272a853c6377d9a5c05c4e9a9 /indra/newview
parent6f136d403b6bbccae80661c6585f29e1caed3a7c (diff)
SL-18983 Fix for alpha HUDs not rendering.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawpoolalpha.cpp39
-rw-r--r--indra/newview/llviewerdisplay.cpp1
2 files changed, 26 insertions, 14 deletions
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 9f1dc979f8..4c8d32fad2 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -115,8 +115,18 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d
}
shader->uniform1i(LLShaderMgr::NO_ATMO, (LLPipeline::sRenderingHUDs) ? 1 : 0);
shader->uniform1f(LLShaderMgr::DISPLAY_GAMMA, (gamma > 0.1f) ? 1.0f / gamma : (1.0f / 2.2f));
- shader->uniform1f(waterSign, water_sign);
- shader->uniform4fv(LLShaderMgr::WATER_WATERPLANE, 1, LLDrawPoolAlpha::sWaterPlane.mV);
+
+ if (LLPipeline::sRenderingHUDs)
+ { // for HUD attachments, only the pre-water pass is executed and we never want to clip anything
+ LLVector4 near_clip(0, 0, -1, 0);
+ shader->uniform1f(waterSign, 1.f);
+ shader->uniform4fv(LLShaderMgr::WATER_WATERPLANE, 1, near_clip.mV);
+ }
+ else
+ {
+ shader->uniform1f(waterSign, water_sign);
+ shader->uniform4fv(LLShaderMgr::WATER_WATERPLANE, 1, LLDrawPoolAlpha::sWaterPlane.mV);
+ }
if (LLPipeline::sImpostorRender)
{
@@ -605,18 +615,21 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
LLSpatialBridge* bridge = group->getSpatialPartition()->asBridge();
const LLVector4a* ext = bridge ? bridge->getSpatialExtents() : group->getExtents();
- if (above_water)
- { // reject any spatial groups that have no part above water
- if (ext[1].getF32ptr()[2] < water_height)
- {
- continue;
+ if (!LLPipeline::sRenderingHUDs) // ignore above/below water for HUD render
+ {
+ if (above_water)
+ { // reject any spatial groups that have no part above water
+ if (ext[1].getF32ptr()[2] < water_height)
+ {
+ continue;
+ }
}
- }
- else
- { // reject any spatial groups that he no part below water
- if (ext[0].getF32ptr()[2] > water_height)
- {
- continue;
+ else
+ { // reject any spatial groups that he no part below water
+ if (ext[0].getF32ptr()[2] > water_height)
+ {
+ continue;
+ }
}
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 2a2d390765..2e20d61b15 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1158,7 +1158,6 @@ void render_hud_attachments()
gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_VOLUME);
gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_ALPHA);
gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_ALPHA_PRE_WATER);
- gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_ALPHA_POST_WATER);
gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_ALPHA_MASK);
gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK);
gPipeline.toggleRenderType(LLPipeline::RENDER_TYPE_FULLBRIGHT);