summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/lighting
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl6
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl6
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl8
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl2
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl4
-rwxr-xr-xindra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl4
16 files changed, 41 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
index cf29939cb2..eaaa7b208d 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -39,13 +39,15 @@ VARYING vec2 vary_texcoord0;
void default_lighting()
{
- vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
if (color.a < minimum_alpha)
{
discard;
}
+ color.rgb *= vertex_color.rgb;
+
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
index 4070d41f47..b9ddbc8e1c 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
@@ -41,13 +41,15 @@ VARYING vec2 vary_texcoord0;
void default_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 = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
index 6c34643aab..5740987ab1 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.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);
@@ -39,13 +40,16 @@ VARYING vec2 vary_texcoord0;
void fullbright_lighting()
{
- vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+ vec4 color = diffuseLookup(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);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
index 2ff7f795b0..c8771a3f1e 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
@@ -32,6 +32,8 @@ out vec4 frag_color;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform float texture_gamma;
+
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -39,10 +41,14 @@ void fullbright_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+ 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;
}
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;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
index 777c8b45bb..c8282e9a51 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -50,7 +50,7 @@ void fullbright_shiny_lighting()
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
index 4fa3b1d939..e7dbd4bbd2 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl
@@ -51,7 +51,7 @@ void fullbright_shiny_lighting()
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
index 58984a4263..5886fc65be 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl
@@ -48,7 +48,7 @@ void fullbright_shiny_lighting_water()
color.rgb = fullbrightShinyAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
index a39b7205d7..cddc7d8df8 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl
@@ -49,7 +49,7 @@ void fullbright_shiny_lighting_water()
color.rgb = fullbrightShinyAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
index 9c82056fd7..6dd3bb937f 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
@@ -41,7 +41,9 @@ VARYING vec2 vary_texcoord0;
void fullbright_lighting_water()
{
- vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
+
+ color.rgb *= vertex_color.rgb;
if (color.a < minimum_alpha)
{
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
index 52e3b2ad02..9208c148ef 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
@@ -50,7 +50,7 @@ void shiny_lighting()
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
index 474d5ea496..92628faa68 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
@@ -51,7 +51,7 @@ void shiny_lighting()
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
index d2a4c47aac..61841674e2 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
@@ -47,7 +47,7 @@ void shiny_lighting_water()
color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
color.rgb = atmosLighting(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
index f3bd662364..0b6e835fd0 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl
@@ -48,7 +48,7 @@ void shiny_lighting_water()
color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);
color.rgb = atmosLighting(color.rgb);
- color.a = max(color.a, vertex_color.a);
+ color.a = 1.0;
frag_color = applyWaterFog(color);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
index b68240ba0d..3426fea52f 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
@@ -39,7 +39,9 @@ VARYING vec2 vary_texcoord0;
void default_lighting_water()
{
- vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
+ vec4 color = diffuseLookup(vary_texcoord0.xy);
+
+ color.rgb *= vertex_color.rgb;
if (color.a < minimum_alpha)
{
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
index da3b20012d..d9faa9b314 100755
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
@@ -41,7 +41,9 @@ VARYING vec2 vary_texcoord0;
void default_lighting_water()
{
- vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
+ vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
+
+ color.rgb *= vertex_color.rgb;
if (color.a < minimum_alpha)
{