Reduced render distance, added back fog

This commit is contained in:
maxwes08
2025-12-15 10:36:33 +01:00
parent 01d86cd2aa
commit 9ffda6f5af
2 changed files with 2 additions and 3 deletions

View File

@@ -15,13 +15,12 @@ void main()
float distSq = dot(delta, delta);
// Precomputed fog parameters
const float fogEndSq = 16384.0; // 128^2
const float fogEndSq = 65536.0; // 128^2
const float fogStartSq = 1024.0; // 32^2
const float fogRangeInv = 1.0 / (fogEndSq - fogStartSq);
float fogFactor = (fogEndSq - distSq) * fogRangeInv;
fogFactor = clamp(fogFactor, 0.0, 1.0);
fogFactor = 1;
// Texture and lighting
vec4 texColor = texture(uTexture, fragUV);