#define USE_FEATURE_Abut
#define LOOP_ITERATIONS 16So, speaking shortly, I want to pass a macro *with* a value so that my shader can, for instance, nicely unroll a loop for which I know a number of iterations upfront. I don't want to declare such a define in the shader directly, because the shader does not have this numeric information - application, right before it compiles the shader, nows.
I tried something like:
D3D10_SHADER_MACRO macros[2]; macros[0].Definition = "LOOP_ITERATIONS"; macros[0].Name = "16"; macros[1].Definition = macros[1].Name = NULL;or:
D3D10_SHADER_MACRO macros[2]; macros[0].Definition = "LOOP_ITERATIONS 16"; macros[0].Name = ""; macros[1].Definition = macros[1].Name = NULL;but none of this works. Any idea?
On a side note: what's the purpose of macro's Name anyway?






