Skip to content

Commit 8b86e2a

Browse files
committed
SL-20611 Followup -- fix for depth based atmospheric mask making atmospherics effect sun/moon/clouds
1 parent 7bfe590 commit 8b86e2a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

indra/newview/app_settings/shaders/class3/deferred/hazeF.glsl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,12 @@ void main()
7878
do_atmospherics = true;
7979
}
8080

81-
8281
vec3 irradiance = vec3(0);
8382
vec3 radiance = vec3(0);
8483

8584
if (depth >= 1.0)
8685
{
87-
//should only be true of WL sky, just port over base color value
86+
//should only be true of sky, clouds, sun/moon, and stars
8887
discard;
8988
}
9089

indra/newview/lldrawpool.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ class LLDrawPool
5353
// before grass, so grass should be the first alpha masked pool. Other ordering should be done
5454
// based on fill rate and likelihood to occlude future passes (faster, large occluders first).
5555
//
56-
POOL_SIMPLE = 1,
56+
POOL_SKY = 1,
57+
POOL_WL_SKY,
58+
POOL_SIMPLE,
5759
POOL_FULLBRIGHT,
5860
POOL_BUMP,
5961
POOL_TERRAIN,
@@ -64,8 +66,6 @@ class LLDrawPool
6466
POOL_TREE,
6567
POOL_ALPHA_MASK,
6668
POOL_FULLBRIGHT_ALPHA_MASK,
67-
POOL_SKY,
68-
POOL_WL_SKY,
6969
POOL_AVATAR,
7070
POOL_CONTROL_AV, // Animesh
7171
POOL_GLOW,

indra/newview/lldrawpoolwlsky.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass)
8787
cloud_shader = nullptr;
8888
sun_shader = nullptr;
8989
moon_shader = nullptr;
90+
91+
// clear the depth buffer so haze shaders can use unwritten depth as a mask
92+
glClear(GL_DEPTH_BUFFER_BIT);
9093
}
9194

9295
void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const

0 commit comments

Comments
 (0)