mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Simplify fog calculation in fragment shader slightly
This commit is contained in:
1 parent
2d8de4c1bf
commit
32fa86f6aa
1 file changed
+1
-1
@@ -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].
|
||||
|
||||
Reference in new issue
Block a user