Anti Aliasing always enabled in Builds

Hi all!

We are currently encountering some unexpected behaviour with the “Anti-Aliasing” flag in the “Rendering” settings of our projects. Reproduction steps:

  1. Create a new “Model Viewer” Project
  2. Go to “Settings” > “Rendering” and uncheck “Anti-Alias”
  3. Note that in Playmode there will be no AA and graphicsDevice.samples will be 1 instead of 4 (as expected)
  4. Go to the “Publish / Download” tab and download the built zip of the project.
  5. Unzip and launch the project locally.
  6. Note that the project will render with visual AA and graphicsDevice.samples will be 4 (unexpected)

Are we missing something or is AA currently always on in builds, no matter what the setting is in the editor?

Here is a quick reproducer project, which will log an error with the graphicsDevice.samples each update:
https://playcanvas.com/project/1183895/

Thanks for your help!
Sam

2 Likes

Did some digging on my own and found the following issue:

Building will generate a __settings__.js, which will have the antialias option defined as false, just as expected. However, the generated __start__.js will look for a field named antiAlias (second A is uppercase) and fallback to true since it can’t find the setting.
Thus all builds will currently have AA enabled independent of what was set in the settings.

I will create an issue in the editor repo for this.

Thank you for reporting. I was able to reproduce. Added an issue for tracking:

1 Like

Thanks @LeXXik, just saw the issue :smiley:
Will comment the additional info there as well.

1 Like