[D3D12] Don't apply the epsilon offset to cubemap face

This commit is contained in:
Triang3l 2018-10-24 17:30:15 +03:00
parent cabffea4d7
commit 64d5574023
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}
}