Jump to content
  • Advertisement
Sign in to follow this  
feal87

Effect Compiler DX10

This topic is 3192 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
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)

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!