Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

2 Answers 2

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
2  
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

 
discard

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.