Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Precompile Effect

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Programmdude   Members   

129
Like
0Likes
Like

Posted 26 April 2012 - 03:06 AM

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.

#2 smasherprog   Members   

568
Like
0Likes
Like

Posted 26 April 2012 - 07:56 AM

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
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.

#3 Programmdude   Members   

129
Like
0Likes
Like

Posted 26 April 2012 - 08:35 AM

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.

#4 leonard2012   Members   

167
Like
0Likes
Like

Posted 26 April 2012 - 09:35 AM

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




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.