Skip to content
M o o n R a b b i t edited this page Jan 5, 2019 · 11 revisions

Anti-Aliasing

Anti-Aliasing can be enabled globally by providing the samplesPerPixel parameter to the FrameBufferOptions in your System.start() call. e.g. System.start({width, 1024, height:768, framebuffer:{samplesPerPixel: 4}}, function(_) {});

This enables hardware anti-aliasing and tries to find a supported sample count which is as close to the supplied parameter as possible. Hardware anti-aliasing is not supported on every hardware/os/driver/target combination. Also, modern hardware usually defaults to multisample anti-aliasing which only takes care of polygon edges.

Clone this wiki locally