summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-06-18 10:39:49 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-06-19 15:52:08 -0700
commitf854e95116cf6d1be1ea1ba562def2e6017179bf (patch)
treed3aab07522e26e1cfae73ae90fc2b87d650d35e6 /indra/newview/app_settings/shaders
parent375f43ed7d6d4f31aff80fa51df85ea0f3eee796 (diff)
SL-9632: Fix most HUD objects incorrectly being effected by the environment lighting
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleV.glsl28
1 files changed, 17 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
index a59bd9c0a6..575a641b7a 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
@@ -1,4 +1,4 @@
-/**
+/**
* @file simpleV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
@@ -28,6 +28,9 @@ uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
+// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass()
+uniform int no_atmo;
+
ATTRIBUTE vec3 position;
void passTextureIndex();
ATTRIBUTE vec2 texcoord0;
@@ -46,19 +49,22 @@ void main()
{
//transform vertex
vec4 vert = vec4(position.xyz,1.0);
- passTextureIndex();
- vec4 pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+
+ passTextureIndex();
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
-
-
- vec3 norm = normalize(normal_matrix * normal);
+ if (no_atmo == 1)
+ {
+ vertex_color = diffuse_color;
+ }
+ else
+ {
+ vec4 pos = (modelview_matrix * vert);
+ vec3 norm = normalize(normal_matrix * normal);
- calcAtmospherics(pos.xyz);
+ calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, diffuse_color);
- vertex_color = color;
-
-
+ vertex_color = calcLighting(pos.xyz, norm, diffuse_color);
+ }
}