Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Synthetix   Members   

192
Like
0Likes
Like

Posted 06 February 2013 - 03:46 AM

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, 06 February 2013 - 06:56 AM.


#2 santa01   Members   

307
Like
0Likes
Like

Posted 06 February 2013 - 06:01 AM

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.



#3 Hodgman   Moderators   

50618
Like
3Likes
Like

Posted 06 February 2013 - 06:11 AM

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, 06 February 2013 - 06:23 AM.


#4 mhagain   Members   

13154
Like
1Likes
Like

Posted 06 February 2013 - 06:15 AM

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.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.