summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-06-17 16:50:35 -0400
committerOz Linden <oz@lindenlab.com>2013-06-17 16:50:35 -0400
commit761bf254a4e72ec521ff1a52ac12f8594a350818 (patch)
treec72f84bb4ac319c10299a35934b52a09a73a127d /indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
parenta2fa9a2bc26bb67c0bb952d3295c380dcb853eb5 (diff)
parent1e41b017e1713a35eb68190d279cf8d28791b6d2 (diff)
merge changes for 3.6.0-release
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
index f4477bd29a..f72f20b03d 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
@@ -30,6 +30,7 @@ out vec4 frag_color;
#endif
uniform float minimum_alpha;
+uniform float texture_gamma;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -41,17 +42,22 @@ VARYING vec2 vary_texcoord0;
void fullbright_lighting()
{
- vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
if (color.a < minimum_alpha)
{
discard;
}
+
+ color.rgb *= vertex_color.rgb;
+ color.rgb = pow(color.rgb, vec3(texture_gamma));
color.rgb = fullbrightAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.rgb = pow(color.rgb, vec3(1.0/texture_gamma));
+
frag_color = color;
}