Massivly improved fog rendering

This commit is contained in:
mcrcortex
2025-08-29 10:03:12 +10:00
parent 269c7da0ac
commit dd4f1de695
2 changed files with 4 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ void main() {
}
#ifdef USE_ENV_FOG
{
float fogLerp = max(fma(min(length(point.xyz), endParams.x),endParams.y,endParams.z),0);//512 is 32*16 which is the render distance in blocks
float fogLerp = clamp(fma(min(length(point.xyz), endParams.x),endParams.y,endParams.z),0,1);//512 is 32*16 which is the render distance in blocks
colour.rgb = mix(colour.rgb, fogColour, fogLerp);
}
#endif