From a2f3b78bac9ac445dbac61686dc2789df82bb090 Mon Sep 17 00:00:00 2001 From: Kojin Date: Sat, 22 Dec 2018 07:23:55 -0500 Subject: [PATCH] gsdx-d3d11: Fix Depth FST Texture scaling for x/y values wasn't being set in all cases. This ensures that it is to fix a bug in finding nemo (and possibly others). --- plugins/GSdx/Renderers/DXCommon/GSRendererDX.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/GSdx/Renderers/DXCommon/GSRendererDX.cpp b/plugins/GSdx/Renderers/DXCommon/GSRendererDX.cpp index eddceddb51..c22ab77df3 100644 --- a/plugins/GSdx/Renderers/DXCommon/GSRendererDX.cpp +++ b/plugins/GSdx/Renderers/DXCommon/GSRendererDX.cpp @@ -297,11 +297,12 @@ void GSRendererDX::EmulateTextureSampler(const GSTextureCache::Source* tex) m_ps_sel.spritehack = tex->m_spritehack_t; m_ps_sel.point_sampler = !bilinear || shader_emulated_sampler; + GSVector4 TextureScale = GSVector4(0.0625f) / WH.xyxy(); + vs_cb.Texture_Scale_Offset.x = TextureScale.x; + vs_cb.Texture_Scale_Offset.y = TextureScale.y; + if (PRIM->FST) { - GSVector4 TextureScale = GSVector4(0.0625f) / WH.xyxy(); - vs_cb.Texture_Scale_Offset.x = TextureScale.x; - vs_cb.Texture_Scale_Offset.y = TextureScale.y; //Maybe better? //vs_cb.TextureScale = GSVector4(1.0f / 16) * GSVector4(tex->m_texture->GetScale()).xyxy() / WH.zwzw(); m_ps_sel.fst = 1;