Effect Compiler DX10

Started by
6 comments, last by RDragon1 14 years, 3 months ago
Simple question, there is (and if yes, what's the function) a function in DirectX10 to compile the content of an effects framework shader into a byte array like the EffectCompiler DX9 one? (to be loaded after. Cause compiling inplace slowdown the startup of the app with many shaders) I'm searching, but i can't find answers...
Advertisement

I think this is what you're looking for:

http://msdn.microsoft.com/en-us/library/ee418539(VS.85).aspx
there is no way to do it programmatically in DirectX10? (without using fxc, in DirectX9 was that easy...)
If there's no way, i'll have to resort to use fxc...(i hoped to avoid it, i have a personal shader creator software and i would like for it to be disattached from external software)
Yeah, there doesn't seem to be a library function that will generate the binary

Searching it seems that fxc needs to generate separately Vertex and Pixel shader...then its the same as the CompileShader function of D3DX.
The question now is, how can I programmatically (without user intervention) determine what function to compile and how to give them to the Effects framework?
It seems like a really clunky process to me...
Eh? The example command lines look like they just just feed in the .fx file and the profile and get an object file out...

fxc /T fx_4_0 /Fo BasicHLSL10.fxo BasicHLSL10.fx
Then it should be possible to do the same with

http://msdn.microsoft.com/en-us/library/ee416688(VS.85).aspx

I didn't read about the fx_*_* profile lol. I'll try it. Thank you.
Oops, I lied.

You can compile from file with D3DX11CompileFromFile and then create a ID3DX11Effect with D3DX11CreateEffectFromMemory

The Effects11 framework is included as source in the SDK - you have to compile it

Also, note that it's busted, here's the fix: http://forums.xna.com/forums/p/38767/225483.aspx

This topic is closed to new replies.

Advertisement