more fog fixes

This commit is contained in:
mcrcortex
2025-12-06 00:19:59 +10:00
parent 43ed8145ff
commit 7f49a84215
3 changed files with 10 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ void main() {
}
#ifdef USE_ENV_FOG
if (fogColour.a>0.0){
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
float fogLerp = clamp(fma(length(point.xyz),endParams.x,endParams.y),0,endParams.z);//512 is 32*16 which is the render distance in blocks
colour.rgb = mix(colour.rgb, fogColour.rgb, fogLerp*fogColour.a);
}
#endif