<\/a><\/p>\nAntialiased, as requested.<\/p>\n
There are really four different kinds of antialiasing. \u00a0These are:<\/p>\n
<\/strong><\/p>\n <\/strong><\/p>\n<\/p>\n\n- Supersampling<\/strong>: \u00a0Draw a really, really big image, and then scale it down for the final display. \u00a0Requires lots of extra memory to store that really big image, and lots of extra fill rate to draw all those extra pixels.<\/span><\/li>\n
- Multisampling<\/strong>: \u00a0Draw normally, but check several different points within each pixel, to see whether that pixel is part of more than one triangle. \u00a0If so, calculate the pixel colour separately for each triangle, and average those colours together to get the final display colour for that pixel. \u00a0This is basically like supersampling, but only affects the pixels at the edges of polygons. \u00a0This makes multisampling much faster and much less memory-hungry than supersampling.<\/span><\/li>\n
- Accumulation buffer<\/strong>: \u00a0Draw the scene several times each frame, with a subpixel jitter between each draw. \u00a0Uses no extra memory, but can result in a subtle blurring to the overall image, and requires lots of extra draws.<\/span><\/li>\n
- Find edges, blur<\/strong>: \u00a0With a simple pair of image space filters, it’s easy to find all the edges in an image, and then blur just those edges without blurring the rest of the image. \u00a0This gives a similar result to multisampling, but requires several fullscreen passes over the final rendered image. \u00a0This was a relatively common approach on some game consoles in the past, but is much rarer, these days.<\/span><\/li>\n<\/ul>\n
<\/strong><\/p>\n
I’ve only implemented multisampling, since it seems to be the best tradeoff in terms of GPU cost and memory usage. \u00a0These days, when folks talk about antialiasing, multisampling is usually what they mean.<\/p>\n
Anyhow, in the screen above I’m using 4x multisampling (the maximum that my poor little laptop will support), which smooths out the jagged edges nicely. \u00a0But yes, it does noticeably increase the amount of time that it takes to render the scene.<\/p>\n
On the other hand, this is an unoptimised debug build, and it’s still happily chugging along at 60fps on my little laptop.<\/p>\n
On the other other hand, it’s drawing a mostly empty world, with very little going on within it, beyond a few subscribers who are becoming annoyed that I haven’t created any monsters for them to fight. \u00a0I suspect this build won’t hold 60fps once it’s actually simulating and drawing a busier world. \u00a0Though I could well be wrong about that. \u00a0Only one way to find out, I guess!<\/p>\n
I find it interesting that most of the extra cost has gone into copying the rendered game screen from its multisampling buffer into the regular buffer, so that I can perform the glowing “bloom” effect; \u00a0calculating the multisampling itself isn’t nearly as expensive as I’d expected!<\/p>\n","protected":false},"excerpt":{"rendered":"
Antialiased, as requested. There are really four different kinds of antialiasing. \u00a0These are: Supersampling: \u00a0Draw a really, really big image, and then scale it down for the final display. \u00a0Requires lots of extra memory to store that really big image, and lots of extra fill rate to draw all those extra pixels. Multisampling: \u00a0Draw normally,…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[24,25],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-jP","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1229"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=1229"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1229\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=1229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=1229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=1229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}