summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/windlight
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-29 18:25:20 +0000
committerRider Linden <rider@lindenlab.com>2019-01-29 18:25:20 +0000
commit51fe738aaf5e84d88f9e2ce7b04e6e4e25c35ffe (patch)
tree1a25946a6bfdf666c9b877508183fef2ba010ec8 /indra/newview/app_settings/shaders/class1/windlight
parent347ae7a38bb2535bac4d3c497e216e3178c6e966 (diff)
parent04cb0884581da31128cf8c7473e8c6b1ba1ddbf9 (diff)
Merged in graham_linden/viewer-eep-fixes (pull request #243)
SL-10303, SL-10414, SL-10415, SL-10424, SL-10381
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/windlight')
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/moonV.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl3
2 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl
index aaa6768ed7..1c43a7332e 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/moonV.glsl
@@ -36,13 +36,14 @@ VARYING vec2 vary_texcoord0;
void main()
{
- //transform vertex
- vec4 vert = vec4(position.xyz, 1.0);
- vec4 pos = (modelview_matrix * vert);
+ //transform vertex
+ vec3 offset = vec3(0, 0, 50);
+ vec4 vert = vec4(position.xyz - offset, 1.0);
+ vec4 pos = (modelview_matrix * vert);
- gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
-
- vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
-
- calcAtmospherics(pos.xyz);
+ gl_Position = modelview_projection_matrix*vert;
+
+ vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+
+ calcAtmospherics(pos.xyz);
}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl
index 1fa32c3f3b..ca116628f1 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/sunDiscV.glsl
@@ -38,7 +38,8 @@ void calcAtmospherics(vec3 eye_pos);
void main()
{
//transform vertex
- vec4 vert = vec4(position.xyz, 1.0);
+ vec3 offset = vec3(0, 0, 50);
+ vec4 vert = vec4(position.xyz - offset, 1.0);
vec4 pos = modelview_projection_matrix*vert;
sun_fade = smoothstep(0.3, 1.0, (position.z + 50) / 512.0f);