瀏覽代碼

shaderc: Added half-texel fixup for D3D9 (experimental, commented out).

Branimir Karadžić 9 年之前
父節點
當前提交
53e2439eba
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      tools/shaderc/shaderc.cpp

+ 10 - 0
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_"
 								);
 						}