summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-06-05 08:50:59 -0700
committerPtolemy <ptolemy@lindenlab.com>2020-06-05 09:35:45 -0700
commit4a92f1787090009b8f11c85b6c267b099eda7dd8 (patch)
treef8deb6db2c9bbc068626a7f3545728437ae05e4d /indra
parentb6941de16a24d65d73370f51c07815ef56c81c4c (diff)
SL-13084: Move texture coords section to top in class2/windlight/cloudsV to match class1/deffered/cloudsV
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl24
1 files changed, 12 insertions, 12 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index b55555ad23..7d560b0363 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -72,6 +72,7 @@ void main()
// World / view / projection
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ // Texture coords
// SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll
// Keep in Sync!
// * indra\newview\llsettingsvo.cpp
@@ -79,6 +80,17 @@ void main()
// * indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl
vary_texcoord0 = vec2( -texcoord0.x, texcoord0.y );
+ 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);
@@ -180,18 +192,6 @@ void main()
vary_CloudDensity = 2. * (cloud_shadow - 0.25);
- // Texture coords
- 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;