Page MenuHome

New Viewport Anti-Aliasing preference conversion selects wrong AA level.
Closed, ResolvedPublic


System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.17

Blender Version
Broken: version: 2.80 (sub 60), branch: master, commit date: 2019-05-09 17:55, hash: rB427c75e4c20b

Short description of error
The Viewport AA level now effectively defaults to 16 samples instead of the previous 8.
Also here, the new Viewport Anti-Aliasing preference did not initially reflect the correct current value in the Preferences display.

The old default viewport quality setting was 0.6. The old code did:

if (IN_RANGE_INCL(wpd->preferences->gpu_viewport_quality,
                           GPU_VIEWPORT_QUALITY_TAA16)) {
      result = MIN2(result, 8);

The IN_RANGE_INCL included the upper bound in the range, and the 0.6 default matched the GPU_VIEWPORT_QUALITY_TAA16 exactly, so the selected default AA level was 8.

In the new code in source/blender/blenloader/intern/versioning_userdef.c, it uses < to compare the thresholds and so it selects the next higher AA level, resulting in an effective change from a default of 8 to 16. It could use <= to retain the old effective quality thresholds.

Also after these changes, my pre-existing 2.80 config showed "No Anti-Aliasing" for the viewport AA level, even though it was clearly using 8 or 16 AA levels. Changing the preference did affect it, and was retained. I tried to reproduce this without success and managed to delete the problematic config files in the process. But here's a screenshot for posterity:

Edit: Oh, maybe the problem of seeing the wrong value in my config was that I may have already had a 2.80.60 config that was created before the relevant patch so the migration of the preference got skipped and was thus uninitialized?

The new settings are otherwise a great improvement over the old opaque "quality" slider though!

Event Timeline

Jeroen Bakker (jbakker) claimed this task.
Jeroen Bakker (jbakker) triaged this task as Confirmed, Medium priority.

@Gavin Scott (Zoot) thanks for the feedback. yes that in this case the default is set to No Anti-Aliasing is IMO because you're user preferences where to new. You could test this by loading the factory defaults this is an older file what should convert correctly.

The change of the default AA level from 8 to 16 is unintended. Will make a fix for this

I'm not sure what user preferences being too new means. To me that seems to indicate a bug in the versioning code.

I think the issue might be that the minor version number is not reliably getting bumped every time there's a persistent data change, and here I had likely saved preferences under a prior 2.80.60 build so when the migration from the old quality setting to the new discreet viewport_aa setting was added, it failed to fire because it thought the data version was already compatible and so the viewport_aa value never got set and remained initialized at zero.

This would only affect someone who had previously saved preferences with a 2.80.60 build. If you re-create the preferences with an older pre-.60 build, then the compatibility migration runs and everything works as intended.