Rendering to a region of a texture

Started by
3 comments, last by Tom Sloper 8 years, 5 months ago
Is it possible to do this in direct X 9? I'm rendering to a very large texture but I only want to update a relatively small region of it. Seems wasteful to render the whole thing?
Advertisement
Yes, that's what the Viewport state does.

Yes, that's what the Viewport state does.

Thanks, I did some googling but couldn't find anything obvious - I was wrongly looking for locking

Just for completeness here some alternatives:

- Scissors (SetScissorRect)
- If you can define the shape easily with primitives, just render that (e.g. a quad to a certain part of your RT)
- Custom clip planes (SetClipPlane)
- clip/discard in the pixel shader (for more complex shapes)
- use the stencil buffer as a mask

cross-posted, locked

http://www.gamedev.net/topic/673037-rendering-to-a-region-of-a-texture/

-- Tom Sloper -- sloperama.com

This topic is closed to new replies.

Advertisement