@@ -135,13 +135,14 @@ export function instPlantsFrag( buildAlpha=false, addShimmer=false ){
135135 const float DepthScalar = .0001;
136136 const float ScreenWarpColorFix = 3.521;
137137 const float ShadowTighten = 2.94;
138+ const float FogDepthMult = 0.05;
138139 ` ;
139140 if ( addShimmer ) {
140141 ret += `
141142 // Shimmer Settings --
142143 // Mid-to-long distance ambient movement in grass + foliage
143- const float ShimmerInf = 1.0 ;
144- const float ShimmerBrightness = .74 ;
144+ const float ShimmerInf = 0.40 ;
145+ const float ShimmerBrightness = .4 ;
145146 const float ShimmerStartMul = 42.0;
146147 const float ShimmerStartRolloff = 1.30;
147148 const float ShimmerEndMult = 4.5;
@@ -244,7 +245,7 @@ export function instPlantsFrag( buildAlpha=false, addShimmer=false ){
244245 float gInf = min( 1.0, max( 0.0, 1.0-depth * ShimmerEndMult ) * ShimmerEndRolloff );
245246 float shimmerInf = ( 1.0 - min(1.0, max( 0.0, 1.0-depth * ShimmerStartMul * ShimmerBrightness ) * ShimmerStartRolloff )) * gInf;
246247
247- float timer = time.x*1.85 + .02 *(vCd.y) + vPos.z*.001 *vCd.y*vCd.z;
248+ float timer = time.x*( 1.85+vCd.x*1.1) + .2 *(vCd.y) + vPos.z*.01 *vCd.y*vCd.z;
248249
249250 float vertlightInf = (sin(vCd.x+timer*(1.0+vCd.y*.001))*.4*ShimmerInf+(1.00-ShimmerInf*.2)) * min( 1.0, vCd.x*ShadowTighten );
250251 vertlightInf = min(1.0, (ShimmerInf) - (1.0-vertlightInf) );
@@ -332,9 +333,15 @@ export function instPlantsFrag( buildAlpha=false, addShimmer=false ){
332333 Cd.rgb = Cd.rgb * (vCd.z*.25*(1.0-gCd)-depth*.1+.45) * (vCd.x*depthFade + 1.0-gCd*depthFade);
333334 ` ;
334335 }
336+ if ( addShimmer ) {
337+ ret += `
338+ Cd.rgb = mix( Cd.rgb, vec3( gCd*3.4 ), depth );
339+ ` ;
340+ }
335341 ret += `
336342
337- float fogMix = clamp( depth * (depth*4.501+1.5) - lightMag*(1.0-depth*1.), 0.0, 1.0 ) ;
343+
344+ float fogMix = clamp( depth * (depth*4.501+1.5) - lightMag*(1.0-depth * FogDepthMult), 0.0, 1.0 ) ;
338345
339346 vec3 toFogColor = fogColor * (gCd*.4 + .7 + gInf*.3);
340347 Cd.rgb= mix( Cd.rgb, toFogColor, fogMix );
0 commit comments