summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-03-19 01:09:12 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-03-19 01:09:12 -0700
commitcbc3c51daf5b6f7ae483fac8522095dea31d582d (patch)
tree9dc0c3098d68a432bb60685fc39642dab68478eb /indra/newview/app_settings
parent4bffb6e79372c1aef5d0124943c5ae0edc790bf0 (diff)
SL-11589 Remove redundant setting vary_texcoord0, cleanup grouping
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl24
1 files changed, 11 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index fb405d4f1a..1ade2c0876 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -73,7 +73,18 @@ void main()
// World / view / projection
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ // Texture coords
vary_texcoord0 = texcoord0;
+ vary_texcoord0.xy -= 0.5;
+ vary_texcoord0.xy /= cloud_scale;
+ vary_texcoord0.xy += 0.5;
+
+ vary_texcoord1 = vary_texcoord0;
+ vary_texcoord1.x += lightnorm.x * 0.0125;
+ vary_texcoord1.y += lightnorm.z * 0.0125;
+
+ vary_texcoord2 = vary_texcoord0 * 16.;
+ vary_texcoord3 = vary_texcoord1 * 16.;
// Get relative position
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
@@ -176,19 +187,6 @@ void main()
vary_CloudDensity = 2. * (cloud_shadow - 0.25);
- // Texture coords
- vary_texcoord0 = texcoord0;
- vary_texcoord0.xy -= 0.5;
- vary_texcoord0.xy /= cloud_scale;
- vary_texcoord0.xy += 0.5;
-
- vary_texcoord1 = vary_texcoord0;
- vary_texcoord1.x += lightnorm.x * 0.0125;
- vary_texcoord1.y += lightnorm.z * 0.0125;
-
- vary_texcoord2 = vary_texcoord0 * 16.;
- vary_texcoord3 = vary_texcoord1 * 16.;
-
// Combine these to minimize register use
vary_CloudColorAmbient += oHazeColorBelowCloud;