• Advertisement
Sign in to follow this  

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

This topic is 1810 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Edited by Synthetix

Share this post


Link to post
Share on other sites
Advertisement

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.

Edited by Hodgman

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement