From 64d5574023fe89b775a73f4ca9a9feceee735429 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Wed, 24 Oct 2018 17:30:15 +0300 Subject: [PATCH] [D3D12] Don't apply the epsilon offset to cubemap face --- src/xenia/gpu/dxbc_shader_translator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/dxbc_shader_translator.cc b/src/xenia/gpu/dxbc_shader_translator.cc index 6d1fffb37..37953a5cb 100644 --- a/src/xenia/gpu/dxbc_shader_translator.cc +++ b/src/xenia/gpu/dxbc_shader_translator.cc @@ -8282,7 +8282,9 @@ void DxbcShaderTranslator::ProcessTextureFetchInstruction( (instr.dimension == TextureDimension::kCube && instr.opcode != FetchOpcode::kGetTextureWeights)) { offset_z = instr.attributes.offset_z; - if (instr.opcode != FetchOpcode::kGetTextureWeights) { + if (instr.opcode != FetchOpcode::kGetTextureWeights && + instr.dimension == TextureDimension::k3D) { + // Z is the face index for cubemaps, so don't apply the epsilon to it. offset_z += 1.0f / 1024.0f; } }