How to reduce aliasing in viewport when downscaling from larger render?

Started by
2 comments, last by 21st Century Moose 11 years, 2 months ago

I have a simple shader that does some image processing on 2D images (textures) and then renders them at video resolutions like 1920x1080. The problem is that the viewport in the UI through which the user views the render is smaller, say a phone size screen. So, although my render is 1920x1080, the viewport is actually much smaller. The result of this is lots of aliasing in the viewport due to the downscaling of the larger render to the smaller viewing area.

What can I do to reduce the aliasing? Is there a standard technique used in this case?

Advertisement

Probably this is what you are looking for http://www.opengl.org/wiki/Multisampling

Still I am not quite sure on what stager does the MSAA performed.

Down scale it by no more than 2x at once. If you need to down-scale further, do it in multiple steps.

Or, ensure that you've generated mip-maps for it before sampling from it.

You could create your render target with automatic mipmapping, then use that to handle the downscaling. A nice advantage of this is that using a trilinear filter would allow blending between two miplevels to the correct size of the output viewport to be automatically handled in hardware for you. Obvious disadvantages are the extra memory usage and possibly not being as fast as doing it yourself on some hardware.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement