2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-13 06:46:10 +00:00

Properly-scaled fog rendering

This commit is contained in:
Jack Andersen
2016-08-08 08:23:12 -10:00
parent a910ddd912
commit e7a339344d
5 changed files with 9 additions and 12 deletions

View File

@@ -54,8 +54,7 @@ static const char* LightingGLSL =
static const char* MainPostGLSL =
"vec4 MainPostFunc(vec4 colorIn)\n"
"{\n"
" float fogZ = (vtf.mvPos.z - fog.start) * fog.rangeScale;\n"
" return vec4(fogZ, fogZ, fogZ, 1.0);\n"
" float fogZ = (-vtf.mvPos.z - fog.start) * fog.rangeScale;\n"
" return mix(fog.color, colorIn, clamp(exp2(-8.0 * fogZ), 0.0, 1.0));\n"
"}\n"
"\n";