@@ -149,6 +149,13 @@ export function envGroundFrag( pointLightCount ){
149
149
uv.x = ( pos.x + pos.y*.05 + baseCd.r + baseCd.r*0.50);
150
150
uv.y = ( pos.z + pos.y*.05 + baseCd.g + baseCd.g*0.65);
151
151
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
+
152
159
// -- -- -- -- -- -- -- --
153
160
// -- UV & Color Noise -- --
154
161
// -- -- -- -- -- -- -- -- -- --
@@ -169,14 +176,6 @@ export function envGroundFrag( pointLightCount ){
169
176
float baseDirtNoise = dirtNoise;
170
177
171
178
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
-
180
179
// -- -- -- -- -- -- -- -- -- --
181
180
// -- World Space Texturing - -- --
182
181
// -- -- -- -- -- -- -- -- -- -- -- --
@@ -196,7 +195,7 @@ export function envGroundFrag( pointLightCount ){
196
195
vec3 grassCd = texture2D( grassDiffuse, pos.xz*2.0 + uvNoiseOffset ).rgb ;
197
196
198
197
// 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 ) ;
200
199
vec3 rockyHillCd = texture2D(hillDiffuse,hillLayerUv).rgb ;
201
200
202
201
// -- -- --
0 commit comments