From 53e2439ebad34f3625966c10894cf0680789f8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 14 Apr 2016 19:40:53 -0700 Subject: [PATCH] shaderc: Added half-texel fixup for D3D9 (experimental, commented out). --- tools/shaderc/shaderc.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/shaderc/shaderc.cpp b/tools/shaderc/shaderc.cpp index a0f89e4f6..2376e492a 100644 --- a/tools/shaderc/shaderc.cpp +++ b/tools/shaderc/shaderc.cpp @@ -1653,6 +1653,16 @@ namespace bgfx preprocessor.writef( "\n#define __RETURN__ \\\n" "\t} \\\n" + ); + + if (hlsl <= 3) + { +// preprocessor.writef( +// "\tgl_Position.xy += u_viewTexel.xy * gl_Position.w; \\\n" +// ); + } + + preprocessor.writef( "\treturn _varying_" ); }