summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-11-30 17:47:58 +0100
committerAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-12-05 03:37:06 +0100
commitc9cd5631e4b149f83c5a49c8fbf869cf2fb5b6a7 (patch)
treed09566a4132530ea65574a886540e0f258103017 /indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl
parent54db4206e9302e7510bc4f103ff59714c1be942d (diff)
parent683bf84bb38adc88d4a4b7fedaed89b41fcac45e (diff)
Merge branch 'main' into DRTVWR-489
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl
index 0d117c6bc7..9a8d791a1d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscV.glsl
@@ -27,11 +27,11 @@ uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
-ATTRIBUTE vec3 position;
-ATTRIBUTE vec2 texcoord0;
+in vec3 position;
+in vec2 texcoord0;
-VARYING vec2 vary_texcoord0;
-VARYING float sun_fade;
+out vec2 vary_texcoord0;
+out float sun_fade;
void calcAtmospherics(vec3 eye_pos);
@@ -44,6 +44,8 @@ void main()
sun_fade = smoothstep(0.3, 1.0, (position.z + 50) / 512.0f);
+ // smash to *almost* far clip plane -- behind clouds but in front of stars
+ pos.z = pos.w*0.999999;
gl_Position = pos;
calcAtmospherics(pos.xyz);