Consider integrating this adjustment (r144) as an alternative:
shader.fragmentShader = shader.fragmentShader.replace(
`#include <dithering_fragment>`,
`#include <dithering_fragment>
float t = time * 0.01 * 10.; // 10 variable speed
float l = line(vPos, gridWidth, vec3(2.0));
vec3 base = roadColor * wave(tuv.x, mix(0.5, roadCurve, getDelta(vPos.y*PI2 /50.0 * sin(t) )), roadWidth, roadSmoothing) /1. ; // road strip
vec3 c = mix(gl_FragColor.rgb, base, l);
// vec3 base2 = vec3(0.1,0.6,0.4) * wave(tuv.x, mix(0.5, 0.36, getDelta(vPos.y*PI2 /50.0 * cos(t) )), 0.06, 0.02) /1. ; // road strip
// vec3 c2 = mix(c, base2, l);
gl_FragColor = vec4(c, diffuseColor.a);
`,
)
This modification enhances the capabilities incorporated at the concluding segment of the fragment shader's main
function.