Skip to content
Snippets Groups Projects
Commit cbc3c51d authored by Ptolemy's avatar Ptolemy
Browse files

SL-11589 Remove redundant setting vary_texcoord0, cleanup grouping

parent 4bffb6e7
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,18 @@ void main() ...@@ -73,7 +73,18 @@ void main()
// World / view / projection // World / view / projection
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
// Texture coords
vary_texcoord0 = texcoord0; 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 // Get relative position
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
...@@ -176,19 +187,6 @@ void main() ...@@ -176,19 +187,6 @@ void main()
vary_CloudDensity = 2. * (cloud_shadow - 0.25); 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 // Combine these to minimize register use
vary_CloudColorAmbient += oHazeColorBelowCloud; vary_CloudColorAmbient += oHazeColorBelowCloud;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment