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.

After doing a render pass with RenderToTarget (RTT), how do you properly render that texture buffer to the screen while maintaining original scale / proportions so it doesn't stretch or lose quality?

Can an AGAL VertexShader & FragmentShader be written so it's adaptable to any Texture size and Viewport dimensions?

I find I'm getting some "blocky" effects in some of my first attempts at "ping-ponging" between two Texture buffers (to create trailing effects). Perhaps I'm not using the UVs correctly between the rendering-to-target and/or the backbuffer?

Is there a simpler way just to "splash" the texture on the backbuffer, or is a Quad absolutely necessary (4 vertices, 2 triangles)?

If it needs the Quad, should the Texture buffer be fully drawn (0.0 to 1.0 for vertical and horizontal UVs), or only a percentage of it should, like the example below?

  • Texture Buffer U: 0.0 to viewport.width/texturebuffer.width;
  • Texture Buffer V: 0.0 to viewport.height/texturebuffer.height;

Thanks!

share|improve this question
add comment

1 Answer 1

You should only render to the area needed as in your example. To speed up rendering, look at using a scissor rectangle.

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.