[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/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 gpu {
|
||||
using namespace ucode;
|
||||
|
@ -85,7 +91,14 @@ void DxbcShaderTranslator::ProcessVertexFetchInstruction(
|
|||
a_.OpAdd(address_dest, index_operand, dxbc::Src::LF(0.5f));
|
||||
a_.OpRoundNI(address_dest, address_src);
|
||||
} else {
|
||||
a_.OpRoundNI(address_dest, index_operand);
|
||||
// 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 {
|
||||
a_.OpRoundNI(address_dest, index_operand);
|
||||
}
|
||||
}
|
||||
if (index_operand_temp_pushed) {
|
||||
PopSystemTemp();
|
||||
|
|
Loading…
Reference in New Issue