summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
index 36433a5827..dc1dead656 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl
@@ -31,6 +31,10 @@ out vec4 frag_color;
#define frag_color gl_FragColor
#endif
+#if !HAS_DIFFUSE_LOOKUP
+uniform sampler2D diffuseMap;
+#endif
+
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
@@ -40,14 +44,20 @@ vec3 fullbrightScaleSoftClip(vec3 light);
void main()
{
- float shadow = 1.0;
-
+#if HAS_DIFFUSE_LOOKUP
vec4 color = diffuseLookup(vary_texcoord0.xy)*vertex_color;
+#else
+ vec4 color = texture2D(diffuseMap, vary_texcoord0.xy)*vertex_color;
+#endif
+
+ color.rgb = pow(color.rgb,vec3(2.2f,2.2f,2.2f));
color.rgb = fullbrightAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.rgb = pow(color.rgb, vec3(1.0/2.2));
+
frag_color = color;
}