Browse Source

shaderc: Added HLSL attributes.

Branimir Karadžić 10 years ago
parent
commit
4a88d1cf4f
1 changed files with 16 additions and 0 deletions
  1. 16 0
      src/bgfx_shader.sh

+ 16 - 0
src/bgfx_shader.sh

@@ -12,6 +12,22 @@
 
 #ifndef __cplusplus
 
+#if BGFX_SHADER_LANGUAGE_HLSL > 3
+#	define BRANCH [branch]
+#	define LOOP   [loop]
+#	define UNROLL [unroll]
+#else
+#	define BRANCH
+#	define LOOP
+#	define UNROLL
+#endif // BGFX_SHADER_LANGUAGE_HLSL > 3
+
+#if BGFX_SHADER_LANGUAGE_HLSL > 3 && BGFX_SHADER_TYPE_FRAGMENT
+#	define EARLY_DEPTH_STENCIL [earlydepthstencil]
+#else
+#	define EARLY_DEPTH_STENCIL
+#endif // BGFX_SHADER_LANGUAGE_HLSL > 3 && BGFX_SHADER_TYPE_FRAGMENT
+
 #if BGFX_SHADER_LANGUAGE_HLSL
 #	define dFdx(_x) ddx(_x)
 #	define dFdy(_y) ddy(-_y)