Fix GLSL switch statement

This commit is contained in:
Jack Andersen 2018-06-06 18:51:23 -10:00
parent 5fb95d69d3
commit 1456026875
1 changed files with 5 additions and 5 deletions

View File

@ -123,20 +123,20 @@ static const char* MainPostGLSL =
" float fogZ, temp;\n" " float fogZ, temp;\n"
" switch (fog.mode)\n" " switch (fog.mode)\n"
" {\n" " {\n"
" case 2u:\n" " case 2:\n"
" fogZ = (-vtf.mvPos.z - fog.start) * fog.rangeScale;\n" " fogZ = (-vtf.mvPos.z - fog.start) * fog.rangeScale;\n"
" break;\n" " break;\n"
" case 4u:\n" " case 4:\n"
" fogZ = 1.0 - exp2(-8.0 * (-vtf.mvPos.z - fog.start) * fog.rangeScale);\n" " fogZ = 1.0 - exp2(-8.0 * (-vtf.mvPos.z - fog.start) * fog.rangeScale);\n"
" break;\n" " break;\n"
" case 5u:\n" " case 5:\n"
" temp = (-vtf.mvPos.z - fog.start) * fog.rangeScale;\n" " temp = (-vtf.mvPos.z - fog.start) * fog.rangeScale;\n"
" fogZ = 1.0 - exp2(-8.0 * temp * temp);\n" " fogZ = 1.0 - exp2(-8.0 * temp * temp);\n"
" break;\n" " break;\n"
" case 6u:\n" " case 6:\n"
" fogZ = exp2(-8.0 * (fog.start + vtf.mvPos.z) * fog.rangeScale);\n" " fogZ = exp2(-8.0 * (fog.start + vtf.mvPos.z) * fog.rangeScale);\n"
" break;\n" " break;\n"
" case 7u:\n" " case 7:\n"
" temp = (fog.start + vtf.mvPos.z) * fog.rangeScale;\n" " temp = (fog.start + vtf.mvPos.z) * fog.rangeScale;\n"
" fogZ = exp2(-8.0 * temp * temp);\n" " fogZ = exp2(-8.0 * temp * temp);\n"
" break;\n" " break;\n"