mirror of
https://github.com/hedge-dev/XenosRecomp.git
synced 2026-05-15 05:11:56 +00:00
Generator changes
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
This commit is contained in:
parent
342a7224ee
commit
2efa88dbd4
1 changed files with 28 additions and 0 deletions
|
|
@ -556,22 +556,38 @@ void ShaderRecompiler::recompile(const AluInstruction& instr)
|
|||
{
|
||||
case AluVectorOpcode::KillEq:
|
||||
indent();
|
||||
#ifdef XENOS_RECOMP_AIR
|
||||
println("if (any({} == {})) discard_fragment();", op(VECTOR_0), op(VECTOR_1));
|
||||
#else
|
||||
println("clip(any({} == {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case AluVectorOpcode::KillGt:
|
||||
indent();
|
||||
#ifdef XENOS_RECOMP_AIR
|
||||
println("if (any({} > {})) discard_fragment();", op(VECTOR_0), op(VECTOR_1));
|
||||
#else
|
||||
println("clip(any({} > {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case AluVectorOpcode::KillGe:
|
||||
indent();
|
||||
#ifdef XENOS_RECOMP_AIR
|
||||
println("if (any({} >= {})) discard_fragment();", op(VECTOR_0), op(VECTOR_1));
|
||||
#else
|
||||
println("clip(any({} >= {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case AluVectorOpcode::KillNe:
|
||||
indent();
|
||||
#ifdef XENOS_RECOMP_AIR
|
||||
println("if (any({} != {})) discard_fragment();", op(VECTOR_0), op(VECTOR_1));
|
||||
#else
|
||||
println("clip(any({} != {}) ? -1 : 1);", op(VECTOR_0), op(VECTOR_1));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -727,7 +743,11 @@ void ShaderRecompiler::recompile(const AluInstruction& instr)
|
|||
break;
|
||||
|
||||
case AluVectorOpcode::Frc:
|
||||
#ifdef XENOS_RECOMP_AIR
|
||||
print("fract({})", op(VECTOR_0));
|
||||
#else
|
||||
print("frac({})", op(VECTOR_0));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case AluVectorOpcode::Trunc:
|
||||
|
|
@ -795,7 +815,11 @@ void ShaderRecompiler::recompile(const AluInstruction& instr)
|
|||
break;
|
||||
|
||||
case AluVectorOpcode::Dst:
|
||||
#ifdef XENOS_RECOMP_AIR
|
||||
print("distance({}, {})", op(VECTOR_0), op(VECTOR_1));
|
||||
#else
|
||||
print("dst({}, {})", op(VECTOR_0), op(VECTOR_1));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -901,7 +925,11 @@ void ShaderRecompiler::recompile(const AluInstruction& instr)
|
|||
break;
|
||||
|
||||
case AluScalarOpcode::Frcs:
|
||||
#ifdef XENOS_RECOMP_AIR
|
||||
print("fract({})", op(SCALAR_0));
|
||||
#else
|
||||
print("frac({})", op(SCALAR_0));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case AluScalarOpcode::Truncs:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue