summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl27
1 files changed, 8 insertions, 19 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
index b2fa5d8a25..fd343ed2dc 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl
@@ -23,42 +23,31 @@
* $/LicenseInfo$
*/
-#extension GL_ARB_texture_rectangle : enable
-
/*[EXTRA_CODE_HERE]*/
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 frag_data[3];
-#else
-#define frag_data gl_FragData
-#endif
+out vec4 frag_data[4];
vec3 srgb_to_linear(vec3 c);
-vec3 fullbrightAtmosTransport(vec3 light);
-vec3 fullbrightScaleSoftClip(vec3 light);
uniform sampler2D diffuseMap;
uniform sampler2D altDiffuseMap;
uniform float blend_factor; // interp factor between sunDisc A/B
-VARYING vec2 vary_texcoord0;
-VARYING float sun_fade;
+in vec2 vary_texcoord0;
+in float sun_fade;
void main()
{
- vec4 sunDiscA = texture2D(diffuseMap, vary_texcoord0.xy);
- vec4 sunDiscB = texture2D(altDiffuseMap, vary_texcoord0.xy);
+ vec4 sunDiscA = texture(diffuseMap, vary_texcoord0.xy);
+ vec4 sunDiscB = texture(altDiffuseMap, vary_texcoord0.xy);
vec4 c = mix(sunDiscA, sunDiscB, blend_factor);
- //c.rgb = fullbrightAtmosTransport(c.rgb);
- c.rgb = fullbrightScaleSoftClip(c.rgb);
// SL-9806 stars poke through
//c.a *= sun_fade;
- frag_data[0] = c;
+ frag_data[0] = vec4(0);
frag_data[1] = vec4(0.0f);
- frag_data[2] = vec4(0.0, 1.0, 0.0, 1.0);
-
- gl_FragDepth = 0.999988f;
+ frag_data[2] = vec4(0.0, 1.0, 0.0, GBUFFER_FLAG_SKIP_ATMOS);
+ frag_data[3] = c;
}