[GPU] Added hack for AC6 floor/ground. Thanks Blackbird88 & TTFH3500
Added to prevent further builds fragmentation. This will stay until accurate RCP will be implemented.
This commit is contained in:
parent
ebdea6b02a
commit
a34944e4d2
|
@ -19,6 +19,12 @@
|
||||||
#include "xenia/gpu/dxbc_shader_translator.h"
|
#include "xenia/gpu/dxbc_shader_translator.h"
|
||||||
#include "xenia/gpu/render_target_cache.h"
|
#include "xenia/gpu/render_target_cache.h"
|
||||||
|
|
||||||
|
DEFINE_bool(
|
||||||
|
ac6_ground_fix, false,
|
||||||
|
"This fixes(hide) issues with black ground in AC6. Use only in AC6. "
|
||||||
|
"Might cause issues in other titles.",
|
||||||
|
"HACKS");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace gpu {
|
namespace gpu {
|
||||||
using namespace ucode;
|
using namespace ucode;
|
||||||
|
@ -84,9 +90,16 @@ void DxbcShaderTranslator::ProcessVertexFetchInstruction(
|
||||||
if (instr.attributes.is_index_rounded) {
|
if (instr.attributes.is_index_rounded) {
|
||||||
a_.OpAdd(address_dest, index_operand, dxbc::Src::LF(0.5f));
|
a_.OpAdd(address_dest, index_operand, dxbc::Src::LF(0.5f));
|
||||||
a_.OpRoundNI(address_dest, address_src);
|
a_.OpRoundNI(address_dest, address_src);
|
||||||
|
} else {
|
||||||
|
// UGLY HACK. Remove ASAP.
|
||||||
|
// Proper fix requires accurate RCP implementation.
|
||||||
|
if (cvars::ac6_ground_fix) {
|
||||||
|
a_.OpAdd(address_dest, index_operand, dxbc::Src::LF(0.00025f));
|
||||||
|
a_.OpRoundNI(address_dest, address_src);
|
||||||
} else {
|
} else {
|
||||||
a_.OpRoundNI(address_dest, index_operand);
|
a_.OpRoundNI(address_dest, index_operand);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (index_operand_temp_pushed) {
|
if (index_operand_temp_pushed) {
|
||||||
PopSystemTemp();
|
PopSystemTemp();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue