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.

In d3d11, you can bind multiple render targets ID3D11DeviceContext::OMSetRenderTargets. But why would you want to do this?

share|improve this question
add comment

2 Answers

up vote 13 down vote accepted

When multiple render targets are bound, they can each be written to individually by the pixel shader -- it isn't (necessarily) the case that all render targets will get the same image. You could write only the red component into one output, only the blue into another, et cetera.

This is used when implementing deferred rendering for example: position, normal, color, et cetera information are each written to their own render target.

share|improve this answer
4  
The new use for 3D TVs is to give multiple local players their own full screen view by filtering only a certain set of the frames to each player. This would be another use for multiple targets. –  James Oct 13 '11 at 19:51
1  
+1 for deferred rendering, thats what I've seen it used most for. MRT is also available in DX9 and 10 btw so it's not a new feature. –  Roy T. Oct 13 '11 at 20:23
2  
@James about time something useful came from that tech hype. :) –  Daniel Oct 14 '11 at 4:31
    
Back in the day it was also used for cube/environment mapping/reflections - there are better ways now though. –  Jonathan Dickinson Oct 14 '11 at 8:07
    
@Daniel singularityhub.com/2010/07/26/… –  James Oct 14 '11 at 16:25
show 1 more comment

The added benefit to using multiple render targets, as in deferred rendering like Josh mentioned, is that you send the scene's geometry to the vertex shader only once and apply it to different pixel shader outputs, instead of re-sending the geometry for every output you need. This saves a lot of computation time for the GPU. The trade-off for faster GPU performance is higher consumption of frame buffer memory.

share|improve this answer
add comment

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.