Jump to content

  • Log In with Google      Sign In   
  • Create Account


DX9 Shaders vs. DX11 Shaders question


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 cephalo   Members   -  Reputation: 533

Like
0Likes
Like

Posted 19 November 2012 - 10:19 AM

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, 19 November 2012 - 10:23 AM.


Sponsor:

#2 Radikalizm   Crossbones+   -  Reputation: 2799

Like
0Likes
Like

Posted 19 November 2012 - 10:29 AM

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.

I gets all your texture budgets!


#3 cephalo   Members   -  Reputation: 533

Like
0Likes
Like

Posted 19 November 2012 - 10:53 AM

Well, if it's just not needed, I can stop thinking about it! Thanks very much.

#4 MJP   Moderators   -  Reputation: 10615

Like
0Likes
Like

Posted 19 November 2012 - 02:06 PM

Just so you're clear, even when compiling shaders seperately you can still put multiple shaders in the same text file.




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.



PARTNERS