nv2a/glsl: Invert fog gen blocks for readability

This commit is contained in:
Matt Borgerson 2025-06-28 00:08:45 -07:00 committed by mborgerson
parent 45724b34e6
commit 8bda9507bd
1 changed files with 4 additions and 6 deletions

View File

@ -175,8 +175,10 @@ MString *pgraph_gen_vsh_glsl(const VshState *state,
state->programmable.program_length, header, body);
}
if (state->fog_enable) {
if (!state->fog_enable) {
/* FIXME: Is the fog still calculated / passed somehow?! */
mstring_append(body, " oFog = vec4(1.0);\n");
} else {
if (!state->is_fixed_function) {
/* FIXME: Does foggen do something here? Let's do some tracking..
*
@ -255,10 +257,6 @@ MString *pgraph_gen_vsh_glsl(const VshState *state,
mstring_append(body,
" oFog = clamp(NaNToOne(vec4(fogFactor)), -FLOAT_MAX, FLOAT_MAX);\n");
// clang-format on
} else {
/* FIXME: Is the fog still calculated / passed somehow?!
*/
mstring_append(body, " oFog = vec4(1.0);\n");
}
mstring_append(body, "\n"