[GPU] Do scale on the final texture combiner output, not the individual sources

This commit is contained in:
fleroviux 2023-06-17 02:06:05 +02:00
parent b854367676
commit c9642292aa

View file

@ -118,9 +118,6 @@ const char* fragmentShader = R"(
case 7u: final.a = 1.0 - source.b; break; // One minus source blue case 7u: final.a = 1.0 - source.b; break; // One minus source blue
} }
final.rgb *= float(1 << (u_textureEnvScale[tev_id] & 3u));
final.a *= float(1 << ((u_textureEnvScale[tev_id] >> 16) & 3u));
return final; return final;
} }
@ -162,6 +159,9 @@ const char* fragmentShader = R"(
default: break; // TODO: figure out what the undocumented values do default: break; // TODO: figure out what the undocumented values do
} }
result.rgb *= float(1 << (u_textureEnvScale[tev_id] & 3u));
result.a *= float(1 << ((u_textureEnvScale[tev_id] >> 16) & 3u));
return result; return result;
} }