Game Development Community

Downsampling a Render Target Texture

by Lorne McIntosh · in Technical Issues · 12/17/2008 (2:06 am) · 2 replies

About the author

Ubiq Visuals is a software and creative content developer for the entertainment industry. Our vision is to provide inspiration and the tools for soon-to-be game designers and creative minds of all ages.


#1
12/17/2008 (1:41 pm)
First off you should move this discussion to the private forums... we're not supposed to post a bunch of engine code out here.

Writing a shader to do the downsample isn't that crazy of an idea as often you want some specialized filtering.

Still if you do a little digging in the code you'll find a few places that use StretchRect...

GFXD3D9TextureObject::readBackBuffer()
GFXD3D9TextureTarget::deactivate()
GFXPCD3D9Device::copyBBToSfxBuff()

It seems that readBackBuffer() was originally intended to do downsampling, but it was never finished... i would start there.