Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
This commit is contained in:
Isaac Marovitz 2025-03-16 15:43:33 -04:00
parent 6153094d1f
commit 58e4631dce
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
2 changed files with 10 additions and 10 deletions

View file

@ -185,6 +185,14 @@ void rcp(T a)
}
#endif
#ifdef __air__
#define UNROLL
#define BRANCH
#else
#define UNROLL [unroll]
#define BRANCH [branch]
#endif
float w0(float a)
{
return (1.0f / 6.0f) * (a * (a * (-a + 3.0f) - 3.0f) + 1.0f);

View file

@ -1646,9 +1646,7 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
{
indent();
#ifdef UNLEASHED_RECOMP
#ifndef XENOS_RECOMP_AIR
print("[unroll] ");
#endif
print("UNROLL ");
#endif
println("for (aL = 0; aL < i{}.x; aL++)", uint32_t(cfInstr.loopStart.loopId));
indent();
@ -1801,17 +1799,11 @@ void ShaderRecompiler::recompile(const uint8_t* shaderData, const std::string_vi
specConstantsMask |= SPEC_CONSTANT_ALPHA_TEST;
indent();
#ifndef XENOS_RECOMP_AIR
out += "[branch] ";
#endif
out += "if (g_SpecConstants() & SPEC_CONSTANT_ALPHA_TEST)";
out += "BRANCH if (g_SpecConstants() & SPEC_CONSTANT_ALPHA_TEST)";
indent();
out += '{';
indent();
out += "\tclip(oC0.w - g_AlphaThreshold);\n";
indent();