Enabling anti-aliasing

Beginner Getting started

In this tutorial we are going to have a look at how to enable anti-aliasing (AA) when using a renderer.

Contents

Via renderer

When a renderer's UseAppSurface property is set to true, you can control the size of the application surface using the RenderScale property. This is a scaling factor of the application surface. If you set this value to 2 for example, then the application surface will be two times larger than the window and downscaled when rendered onto the screen. This way you will effectively get 2xAA. Please note that doing AA this way can have a heavy impact on your game's performance!

/// @desc Create event
renderer = new BBMOD_DefaultRenderer();
renderer.UseAppSurface = true;
renderer.RenderScale = 2;

Tip: The RenderScale property can be also used to render your game at a lower resolution than the window size and then upscale it, which can boost performance. E.g. with RenderScale equal to 0.5 your game will be rendered at half resolution.

Via post-processor

Another way to add AA is using a post-processor, by simply adding the BBMOD_FXAAEffect to it:

/// @desc Create event
renderer = new BBMOD_DefaultRenderer();
renderer.UseAppSurface = true;

postProcessor = new BBMOD_PostProcessor();
postProcessor.add_effect(new BBMOD_FXAAEffect());
renderer.PostProcessor = postProcessor;

Could not find what you were looking for?

We are still working on more tutorials. If you need additional help with BBMOD, please have a look at the documentation or join our Discord community. Thank you for your patience.

Support the development

Support us in developing BBMOD, get priority assistance and more of our amazing tools as a reward!

Become Patron

Don't miss out on a thing!

Create an account, subscribe to newsletter and get notified on new releases, tutorials and special offers.

Register Log in