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

I'm trying to make a simple post processing pipeline, depicted as follows with 3 effects in this case:

        |------|    |------|    |------|
   I -->|Shader|-O->|Shader|-I->|Shader|-O->
        |------|    |------|    |------|

I and O stand for a pair of 2 ShaderResourceViews/RenderTargetViews.

My plan was to do the following:

  1. Create a shader resource and render target for each the input and the output
  2. Apply the shader
  3. Swap input and output to be used for the next shader
  4. Goto 2.

This sounds somewhat confusing, but basically the same 2 ShaderResourceViews /RenderTargetViews should be reused for each stage of the post processing pipeline.

Is this possible, or do I have to create separate input and output ShaderResourceViews /RenderTargetViews for each stage of the postprocessing pipeline?

share|improve this question
up vote 3 down vote accepted

You'll need to create the textures with both the D3D11_BIND_RENDER_TARGET and D3D11_BIND_SHADER_RESOURCE bind flags, and you must take care to unbind them from their previous assignment before swapping them, but it should work fine.

Also, make sure the format you want to use is listed in the supported render target formats, and not listed in the formats not supported for Texture2D here:

share|improve this answer
it's the second time you help me, thanks a lot! – thumbmunkeys Jan 26 '13 at 19:30

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.