Simplify fog calculation in fragment shader slightly

This commit is contained in:
Henrik Rydgård
2026-07-08 12:11:09 +02:00
parent 2d8de4c1bf
commit 32fa86f6aa
+1 -1
View File
@@ -864,7 +864,7 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
if (enableFog) {
WRITE(p, " float fogCoef = clamp(v_fogdepth, 0.0, 1.0);\n");
WRITE(p, " v = mix(vec4(u_fogcolor, v.a), v, fogCoef);\n");
WRITE(p, " v.rgb = mix(u_fogcolor, v.rgb, fogCoef);\n");
}
// Texture access is at half texels [0.5/256, 255.5/256], but colors are normalized [0, 255].