From 4a92f1787090009b8f11c85b6c267b099eda7dd8 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 5 Jun 2020 08:50:59 -0700 Subject: SL-13084: Move texture coords section to top in class2/windlight/cloudsV to match class1/deffered/cloudsV --- .../shaders/class2/windlight/cloudsV.glsl | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview') 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; -- cgit v1.2.3