Sign in to follow this  
Programmdude

Precompile Effect

Recommended Posts

I am using DX9/DX10 via SlimDX for a project, and am looking into ways of speeding up loading.
One of the slow-downs is loading the effect files. I am currently using Effect.FromString to load the effects.
I have looked through the documentation and on google, but I have found no way of precompiling effects for either DX9 or DX10.
The only slightly related articles are those of compiling individual shaders(pixel shader, vertex shader, etc), but it doesn't seem possible to recreate the effect after you compile the individual parts.

Share this post


Link to post
Share on other sites
I havent used SlimDX before, but you can compile an effect in Directx. http://msdn.microsoft.com/en-us/library/windows/desktop/bb205078%28v=vs.85%29.aspx

Maybe that will help you in your search in slimdx

Share this post


Link to post
Share on other sites
That is what I use currently, what I am looking for is a way of compiling it before running the game into some form of optimized binary form instead. It should speed up loading the effect.

Share this post


Link to post
Share on other sites
[size=4][font=times new roman,times,serif]You can [color=#000000]pre-compile the effect file into a binary file using fxc.exe. To do this, add custom build rules to .fx files in your project.[/color][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this