Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As far as I understand for DirectX11 it is recommended to have multiple single pass shaders, so the the method with multiple passes in one shader file is deprecated. Is my understanding correct and where can I find more information about that?

How would I go about creating a multi pass shader in DirectX11? The way I understand it, one would have to apply a shader and then copy the shader result to be used as input for the next shader pass.

Is this the right way to do it? Any information on this subject is very appreciated.

share|improve this question
up vote 1 down vote accepted

Multipass isn't going anywhere. The FX format and the whole techniques/passes syntax is best avoided, as the effects framework is now distributed only as source and a "real" engine can do things much faster and generally needs its own high level wrapper format anyway to manage its own shader/material/effects facilities. Probably using Cg as the main shader language (similar to HLSL) to ease porting to mobile, PS, Mac, Linux, and other non-D3D systems.

share|improve this answer
It's funny how MSFT ditches their technologies almost as soon as people start adopting it – bobobobo Feb 5 '13 at 0:41

All a multi-pass shader really is is more than one separate set of shaders that operate on the same input data. For example, toon rendering is a common application of multi-pass shading, with two distinct passes:

  1. Render the object
  2. Render the object's outline

You can implement this by writing two sets of shaders, one for the object, one for the outline, and then rendering the same geometry with the same world transform, bones, etc. once per set.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.