Skip to content
Snippets Groups Projects
Commit 8b86e2ad authored by David Parks's avatar David Parks
Browse files

SL-20611 Followup -- fix for depth based atmospheric mask making atmospherics...

SL-20611 Followup -- fix for depth based atmospheric mask making atmospherics effect sun/moon/clouds
parent 7bfe590a
No related branches found
No related tags found
No related merge requests found
...@@ -78,13 +78,12 @@ void main() ...@@ -78,13 +78,12 @@ void main()
do_atmospherics = true; do_atmospherics = true;
} }
vec3 irradiance = vec3(0); vec3 irradiance = vec3(0);
vec3 radiance = vec3(0); vec3 radiance = vec3(0);
if (depth >= 1.0) if (depth >= 1.0)
{ {
//should only be true of WL sky, just port over base color value //should only be true of sky, clouds, sun/moon, and stars
discard; discard;
} }
......
...@@ -53,7 +53,9 @@ class LLDrawPool ...@@ -53,7 +53,9 @@ class LLDrawPool
// before grass, so grass should be the first alpha masked pool. Other ordering should be done // before grass, so grass should be the first alpha masked pool. Other ordering should be done
// based on fill rate and likelihood to occlude future passes (faster, large occluders first). // based on fill rate and likelihood to occlude future passes (faster, large occluders first).
// //
POOL_SIMPLE = 1, POOL_SKY = 1,
POOL_WL_SKY,
POOL_SIMPLE,
POOL_FULLBRIGHT, POOL_FULLBRIGHT,
POOL_BUMP, POOL_BUMP,
POOL_TERRAIN, POOL_TERRAIN,
...@@ -64,8 +66,6 @@ class LLDrawPool ...@@ -64,8 +66,6 @@ class LLDrawPool
POOL_TREE, POOL_TREE,
POOL_ALPHA_MASK, POOL_ALPHA_MASK,
POOL_FULLBRIGHT_ALPHA_MASK, POOL_FULLBRIGHT_ALPHA_MASK,
POOL_SKY,
POOL_WL_SKY,
POOL_AVATAR, POOL_AVATAR,
POOL_CONTROL_AV, // Animesh POOL_CONTROL_AV, // Animesh
POOL_GLOW, POOL_GLOW,
......
...@@ -87,6 +87,9 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass) ...@@ -87,6 +87,9 @@ void LLDrawPoolWLSky::endDeferredPass(S32 pass)
cloud_shader = nullptr; cloud_shader = nullptr;
sun_shader = nullptr; sun_shader = nullptr;
moon_shader = nullptr; moon_shader = nullptr;
// clear the depth buffer so haze shaders can use unwritten depth as a mask
glClear(GL_DEPTH_BUFFER_BIT);
} }
void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLocal, LLGLSLShader * shader) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment