Hello,
I'm using .fx files for my shader code. The problem is that when compiling Effect (ID3DXEffect) the vertex and pixel shader code are compiled together.
The problem is Vertex Shader has limitation max 4 sampler registers, while pixel shader can hold 16. So the fx file won't compile because I want more than 4.
Now what I would like to do is put a #ifdef around the samplers (because they're not used in the vertex shader code anyway) so that my FX file will compile. But of course they have to be seen when the ID3DXEffect is compiled for the Pixel Shader part only.. So I need to be able to set a Macro only for when the ID3DXEffect compiles the Pixel Shader, but not the Vertex Shader.
However I can't seem to find out how ? It seems I can only do it by compiling vertex and pixel shaders myself and doing all that work myself, basicly losing the benefit of ID3DXEffect...
I was really hoping maybe D3DX sets a macro themselves that I can use, but I can't find any information about it anywhere.
Anyone has the answer? ?