summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-03-12 14:34:51 -0500
committerGitHub <noreply@github.com>2024-03-12 14:34:51 -0500
commitf16a1bf0af97114f95722c177d26a67f847d31f8 (patch)
treea7cce6883a34576ea312995f8b5f43b337f335bf /indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
parent5fca8915d8f44cdb2a4f7bb4715d61ba47043e5d (diff)
parent457b720fd9b2ced6f288d4bbc71045cefaed4a49 (diff)
Merge pull request #974 from secondlife/965-eep-skies-too-bright-after-hdri-local-preview-merge
965 eep skies too bright after hdri local preview merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/skyF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index cc5280d929..596e9321e8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -86,7 +86,9 @@ void main()
pos = env_mat * pos;
vec2 texCoord = vec2(atan(pos.z, pos.x) + PI, acos(pos.y)) / vec2(2.0 * PI, PI);
vec3 color = textureLod(environmentMap, texCoord.xy, 0).rgb * sky_hdr_scale;
- color = min(color, vec3(8192*8192*16));
+ color = min(color, vec3(8192*8192*16)); // stupidly large value arrived at by binary search -- avoids framebuffer corruption from some HDRIs
+
+ frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_HAS_HDRI);
#else
// Potential Fill-rate optimization. Add cloud calculation
@@ -104,12 +106,11 @@ void main()
color.rgb *= 2.;
color.rgb = clamp(color.rgb, vec3(0), vec3(5));
+ frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_SKIP_ATMOS);
#endif
frag_data[0] = vec4(0);
frag_data[1] = vec4(0);
- frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_SKIP_ATMOS);
frag_data[3] = vec4(color.rgb, 1.0);
-
}