Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Techniques and passes without Effects11


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 drowsyn   Members   -  Reputation: 142

Like
0Likes
Like

Posted 03 June 2012 - 09:34 AM

I've been putting together my own little shader framework, and something that has me a little stumped is the concept of techniques and passes. I can't figure out how these things are supposed to work without using the Effects11 framework. What I'm essentially doing is that first I compile the shaders and create the ID3D11Vertex(/Pixel)Shader objects, and then just set them with VSSetShader and PSSetShader. I'd imagine that setting the technique and going through its passes would be somewhere either right before or right after setting the shaders, but there doesn't appear to be any API for using that stuff.

Surely there has to be a way to do multiple passes without using Effects11? I tried to dig into the Effects11 source too, but that just gave me a huge headache and left me fairly clueless. I'm starting to think that the whole idea of techniques and passes is something that only exists within the Effects11 framework, and isn't actually a part of "raw" HLSL shaders. If anyone could nudge me in the right direction, I'd really appreciate it.


Sponsor:

#2 Radikalizm   Crossbones+   -  Reputation: 2992

Like
1Likes
Like

Posted 03 June 2012 - 09:43 AM

You're right, techniques and passes are a part of Effects11, and if you want to support them in your own shader framework you'll have to design and implement them yourself.
The shader reflection API can provide a starting point if you want to implement these

I gets all your texture budgets!


#3 Jason Z   Crossbones+   -  Reputation: 5395

Like
1Likes
Like

Posted 03 June 2012 - 04:05 PM

You are completely right - the idea of techniques and passes is not part of the low level API. What you can think about is that for each pass, you need to provide a complete pipeline state (including all shader programs, state objects, and the resources needed by the shaders). Then for each of these passes, you execute a draw call to push your geometry through the pipeline.

A technique is just a way to have multiple of these setups within a single file. I personally don't use the concept of passes, but it can be a useful way to specify how you want something to be rendered.

#4 drowsyn   Members   -  Reputation: 142

Like
0Likes
Like

Posted 04 June 2012 - 02:25 AM

I moved to DX11 after working with XNA for a while and started working with the Effects11 stuff at first, so I started with the assumption that techniques and passes were a part of the API. Never assume anything!

Thanks guys!

Edited by drowsyn, 04 June 2012 - 05:32 AM.






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