summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/skyF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl42
1 files changed, 20 insertions, 22 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index 22f4729e2e..331249dc33 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -1,5 +1,5 @@
/**
- * @file WLSkyF.glsl
+ * @file class1/deferred/skyF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -23,6 +23,8 @@
* $/LicenseInfo$
*/
+/*[EXTRA_CODE_HERE]*/
+
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_data[3];
#else
@@ -35,32 +37,28 @@ out vec4 frag_data[3];
VARYING vec4 vary_HazeColor;
-uniform sampler2D cloud_noise_texture;
-uniform vec4 gamma;
-
/// Soft clips the light with a gamma correction
-vec3 scaleSoftClip(vec3 light) {
- //soft clip effect:
- light = 1. - clamp(light, vec3(0.), vec3(1.));
- light = 1. - pow(light, gamma.xxx);
-
- return light;
-}
+vec3 scaleSoftClip(vec3 light);
+vec3 srgb_to_linear(vec3 c);
void main()
{
- // Potential Fill-rate optimization. Add cloud calculation
- // back in and output alpha of 0 (so that alpha culling kills
- // the fragment) if the sky wouldn't show up because the clouds
- // are fully opaque.
+ // Potential Fill-rate optimization. Add cloud calculation
+ // back in and output alpha of 0 (so that alpha culling kills
+ // the fragment) if the sky wouldn't show up because the clouds
+ // are fully opaque.
+
+ vec4 color;
+ color = vary_HazeColor;
+
+ color.rgb *= 2.;
+ color.rgb = scaleSoftClip(color.rgb);
- vec4 color;
- color = vary_HazeColor;
- color *= 2.;
+ /// Gamma correct for WL (soft clip effect).
+ frag_data[0] = vec4(color.rgb, 0.0);
+ frag_data[1] = vec4(0.0,0.0,0.0,0.0);
+ frag_data[2] = vec4(0.0,0.0,0.0,1.0); //1.0 in norm.w masks off fog
- /// Gamma correct for WL (soft clip effect).
- frag_data[0] = vec4(scaleSoftClip(color.rgb), 1.0);
- frag_data[1] = vec4(0.0,0.0,0.0,0.0);
- frag_data[2] = vec4(0.5,0.5,0.0,1.0); //1.0 in norm.w masks off fog
+ gl_FragDepth = 0.99999f;
}