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')
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl11
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl11
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl13
6 files changed, 15 insertions, 65 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
index 0bb48061e0..b2c83a0f44 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -31,9 +31,6 @@ out vec4 frag_color;
uniform float minimum_alpha;
-// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO;
-uniform int no_atmo;
-
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
@@ -51,12 +48,8 @@ void default_lighting()
color *= vertex_color;
- // SL-9632 HUDs are affected by Atmosphere
- if (no_atmo == 0)
- {
- color.rgb = atmosLighting(color.rgb);
- color.rgb = scaleSoftClip(color.rgb);
- }
+ color.rgb = atmosLighting(color.rgb);
+ color.rgb = scaleSoftClip(color.rgb);
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
index ad2170bbd3..00749213db 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
@@ -32,9 +32,6 @@ out vec4 frag_color;
uniform float minimum_alpha;
uniform float texture_gamma; // either 1.0 or 2.2; see: "::TEXTURE_GAMMA"
-// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass()
-uniform int no_atmo;
-
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -54,16 +51,8 @@ void fullbright_lighting()
color.rgb = pow(color.rgb, vec3(texture_gamma));
- // SL-9632 HUDs are affected by Atmosphere
- if (no_atmo == 0)
- {
- color.rgb = fullbrightAtmosTransport(color.rgb);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
- }
-
- //*TODO: Are we missing an inverse pow() here?
- // class1\lighting\lightFullbrightF.glsl has:
- // color.rgb = pow(color.rgb, vec3(1.0/texture_gamma));
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
index 89be8195f0..b9dc332043 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
@@ -34,9 +34,6 @@ VARYING vec2 vary_texcoord0;
uniform float texture_gamma;
-// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO;
-uniform int no_atmo;
-
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -46,12 +43,8 @@ void fullbright_lighting()
color.rgb = pow(color.rgb, vec3(texture_gamma));
- // SL-9632 HUDs are affected by Atmosphere
- if (no_atmo == 0)
- {
- color.rgb = fullbrightAtmosTransport(color.rgb);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
- }
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
color.rgb = pow(color.rgb, vec3(1.0/texture_gamma));
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
index 5e966293c6..092a7088da 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -35,9 +35,6 @@ VARYING vec3 vary_texcoord1;
uniform samplerCube environmentMap;
-// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass()
-uniform int no_atmo;
-
vec3 fullbrightShinyAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -49,23 +46,11 @@ void fullbright_shiny_lighting()
vec4 color = diffuseLookup(vary_texcoord0.xy);
color.rgb *= vertex_color.rgb;
- // SL-9632 HUDs are affected by Atmosphere
- if (no_atmo == 0)
- {
vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low
color.rgb = fullbrightShinyAtmosTransport(color.rgb);
color.rgb = fullbrightScaleSoftClip(color.rgb);
- }
-/*
- // NOTE: HUD objects will be full bright. Uncomment if you want "some" environment lighting effecting these HUD objects.
- else
- {
- vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low
- }
-*/
color.a = 1.0;
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
index f621a00785..cbbb206bc1 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
@@ -23,15 +23,10 @@
* $/LicenseInfo$
*/
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 frag_color;
-#else
-#define frag_color gl_FragColor
-#endif
-VARYING vec4 vertex_color;
-VARYING vec2 vary_texcoord0;
-VARYING vec3 vary_texcoord1;
+in vec4 vertex_color;
+in vec2 vary_texcoord0;
+in vec3 vary_texcoord1;
uniform samplerCube environmentMap;
@@ -39,7 +34,7 @@ vec3 scaleSoftClip(vec3 light);
vec3 atmosLighting(vec3 light);
vec4 applyWaterFog(vec4 color);
-void shiny_lighting()
+vec4 shiny_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy);
color.rgb *= vertex_color.rgb;
@@ -51,6 +46,6 @@ void shiny_lighting()
color.rgb = scaleSoftClip(color.rgb);
color.a = 1.0;
- frag_color = color;
+ return color;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
index 2b6f414005..f2a4665514 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl
@@ -23,15 +23,10 @@
* $/LicenseInfo$
*/
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 frag_color;
-#else
-#define frag_color gl_FragColor
-#endif
-VARYING vec4 vertex_color;
-VARYING vec2 vary_texcoord0;
-VARYING vec3 vary_texcoord1;
+in vec4 vertex_color;
+in vec2 vary_texcoord0;
+in vec3 vary_texcoord1;
uniform samplerCube environmentMap;
uniform sampler2D diffuseMap;
@@ -52,6 +47,6 @@ void shiny_lighting()
color.rgb = scaleSoftClip(color.rgb);
color.a = 1.0;
- frag_color = color;
+ return color;
}