Quote:I didn't realize this was exclusive to the interface. I had thought that all shaders could be loaded in from a file, without the use of the interface. I also use HLSL. Isn't HLSL a MS creation?
you can definetly load all shaders in from a file without fx files. You can achive the same behaviour by simply checking the shader version the hw supports and then loading in the corresponding shader file, ie:
if ps >= 2.0 load bumpmap2else load bumpmap1
but that hardcodes it. What would happen if you wanted to add support for a bumpmap3 using ps3.0? you'd need to go and change the code and add another if statement. That would require a recompile - not fun
THough with an effect file you just put the most demanding techniques at the top of the file, and then the effect interface will analyze each technique in turn and return a handle to the first one that is validated on the hw it is run on. That way it just becomes a matter of:
handle h = effect->FindValidTechnique();// h now points to the "best" technique on *this* hw
Now to add ps3 support, you just add the ps3 implementation to the top of the effect file, and the code stays the same. No need for a recompile, just redistribute the effect file. Now 'h' will be a handle to the ps3 technique if it is valid on the hw.
and yes, hlsl is an ms creation. Actually, i think it was a collaboration between ms and nvidia, not sure though...
Quote:
I'm guessing the graphics card is uploaded with a set of instructions for each technique? So you just mean that loading this data from a file would not be as convinient without ID3DXEffect, correct? It must still be possible, ..errr I would think.
correct, the effect framework is at its most basic level, simply a convenience for developers. There's nothing stopping you from making your own set of routines that does the same (more or less depending on your project needs that is).
If you're interested, you should read
this in which a similar system using dlls is described.
Quote:Hehe, that wasn't my post
Thanks a lot for your help, IFooBar + Coder.
oops, forgot to change the name in the quote tag :)
And you're welcome.