SL-13084: Move texture coords section to top in class2/windlight/cloudsV to match class1/deffered/cloudsV

meow-7.2.2
Ptolemy 2020-06-05 08:50:59 -07:00
parent a352b1882d
commit 52aad743db
1 changed files with 12 additions and 12 deletions

View File

@ -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;