Possible / How to render to multiple back buffers, using one as a shader resource when rendering to the other, and vice versa?
Posted
by
Raptormeat
on Game Development
See other posts from Game Development
or by Raptormeat
Published on 2012-09-10T21:43:18Z
Indexed on
2012/09/10
21:50 UTC
Read the original article
Hit count: 227
I'm making a game in Direct3D10. For several of my rendering passes, I need to change the behavior of the pass depending on what is already rendered on the back buffer. (For example, I'd like to do some custom blending- when the destination color is dark, do one thing; when it is light, do another).
It looks like I'll need to create multiple render targets and render back and forth between them. What's the best way to do this?
- Create my own render textures, use them, and then copy the final result into the back buffer.
- Create multiple back buffers, render between them, and then present the last one that was rendered to.
- Create one render texture, and one back buffer, render between them, and just ensure that the back buffer is the final target rendered to
I'm not sure which of these is possible, and if there are any performance issues that aren't obvious. Clearly my preference would be to have 2 rather than 3 default render targets, if possible.
© Game Development or respective owner