PDA

View Full Version : compiling directx effect files


TurkeyBoy
27-Aug-2003, 09:21
i'm attempting to integrate a dx effect file system into our PC engine ..
but i have encountered a few hazy areas that i would like to clear up ..
the directx documentation on effect files is fairly limited ...

first .. i wonder about compiling effect files?
i have investigated fxc.exe, but from what i can tell, it compiles the effect as if it were compiling it for runtime .. (it takes parameters to set the target hardware/shader version to compile for) .. which defeats a lot of the purpose of using fx files in my opinion .. the point is to compile and decide the target hardware at runtime .. but it seems stupid to include ascii effect files in a retail game .. it also seems silly for the effect compiler to have to parse text based effect files at runtime in a retail game ..

it would be nice to be able to 'compile' them into a binary form, but then they are actually compiled at runtime and optimised for the hardware they are running on .. is there a way to do this?

ET
29-Aug-2003, 10:28
Compile the effect with target fx_2_0, not vs_* or ps_*. (I asked your question in microsoft.public.win32.programmer.directx.graphics and that's the answer I got; reading the docs, they also say that.)