Creating render targets

Started by
1 comment, last by ET3D 16 years, 9 months ago
Hi. I want to implement a post effect pass into my 3d engine. That means I have to pass the render output of the previous render pass to the next render pass as a texture parameter. I suppose that is not possible to render to the same texture surface that is passed to the post effect shader, so I wonder what could be the most efficient way to create offline render targets when rendering many post passes. Do I have to create a new render target for each render pass or is it better to use two alternating render targets? Is it recommended to dispose or to re-use the render target after rendering a pass or a frame? Thank you for clearing up this mystery! Christian
Advertisement
It totally depends on what you want to do,
Let's take for example a blur sample I did, we only want to blur the cube,
so you render the cube to a texture, then you pass the texture to a blurring shader. You then render the blurred texture.

Like I said, you need to think about this and use it the way it suites you best.

I hope this helps.
Take care.
Alternating render targets is a good way to go.

This topic is closed to new replies.

Advertisement