Jump to content
  • Advertisement
Sign in to follow this  
cephalo

DX11 DX9 Shaders vs. DX11 Shaders question

This topic is 2131 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

I am in the middle of converting a SlimDX project from dx9 to dx11. Wow, so different! Anyway I have a question. In dx9, an effect consisted of an fx file with a vertex shader and a pixel shader. With dx11, there are a few more shader types naturally, but every example I find of dx11 code compiles the shaders individually. First you compile the vertex shader, then the hull shader, then the domain shader etc. and then you set them individually in the device context. Is that the way it is supposed to be done now? I don't actually mess with anything called an 'Effect'? Should I not put the different shaders in the same fx file? I haven't been able to gain any sense of a best practice when writing and managing dx11 shaders other than keeping everything separated, which would seem to complicate things, especially with so many pipeline stages that need shaders.

What is the difference, if any, between tutorials and 'real world' shader authoring? Edited by cephalo

Share this post


Link to post
Share on other sites
Advertisement
The effects framework has been deprecated recently with the release of the latest Windows SDK. There used to be a separate Effects11 library in the previous DXSDK release which you could compile yourself if you wanted to use the effects library in DirectX 11, but obviously it isn't available anymore.

This does mean that you'll have to do shader management all by yourself, and I feel this is a much better solution than the old effects library as it 'forces' you to think more about how to handle your shaders and how to organize your state switches.
You could perfectly implement something like the effects framework by yourself though, there are a couple of threads floating around created by people who're doing exactly that.

Share this post


Link to post
Share on other sites
Just so you're clear, even when compiling shaders seperately you can still put multiple shaders in the same text file.

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!