@@ -149,6 +149,13 @@ export function envGroundFrag( pointLightCount ){
149149 uv.x = ( pos.x + pos.y*.05 + baseCd.r + baseCd.r*0.50);
150150 uv.y = ( pos.z + pos.y*.05 + baseCd.g + baseCd.g*0.65);
151151
152+ // -- -- -- -- -- -- -- -- -- -- -- -- --
153+ // -- Texture Offset by Position atan -- --
154+ // -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
155+
156+ vec2 atanVec = normalize( vec2( vModelPos.x + vModelPos.y*.5, vModelPos.z + vModelPos.y*.1 ) );
157+ float deg = atan( atanVec.y, atanVec.x );
158+
152159 // -- -- -- -- -- -- -- --
153160 // -- UV & Color Noise -- --
154161 // -- -- -- -- -- -- -- -- -- --
@@ -169,14 +176,6 @@ export function envGroundFrag( pointLightCount ){
169176 float baseDirtNoise = dirtNoise;
170177
171178
172- // -- -- -- -- -- -- -- -- -- -- -- -- --
173- // -- Texture Offset by Position atan -- --
174- // -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
175-
176- vec2 atanVec = normalize( vec2( vModelPos.x + vModelPos.y*.5, vModelPos.z + vModelPos.y*.1 ) );
177- float deg = atan( atanVec.y, atanVec.x );
178- deg = cos(deg*PI*2.0 - pos.x*.02 + pos.z*.02 )*0.050;
179-
180179 // -- -- -- -- -- -- -- -- -- --
181180 // -- World Space Texturing - -- --
182181 // -- -- -- -- -- -- -- -- -- -- -- --
@@ -196,7 +195,7 @@ export function envGroundFrag( pointLightCount ){
196195 vec3 grassCd = texture2D( grassDiffuse, pos.xz*2.0 + uvNoiseOffset ).rgb ;
197196
198197 // Shift the rocky hill texture so it reads it more horizontally
199- vec2 hillLayerUv = vec2( subUv.x-uv.y *0.15 , vModelPos.y*.007 ) ;
198+ vec2 hillLayerUv = vec2( pos.x*0.1885 + pos.z *0.836 + deg*9.17 , vModelPos.y*.007 ) ;
200199 vec3 rockyHillCd = texture2D(hillDiffuse,hillLayerUv).rgb ;
201200
202201 // -- -- --
0 commit comments