[Bf-blender-cvs] [cf1a945e5ad] master: Preferences: Default ViewportAA

Jeroen Bakker noreply at git.blender.org
Wed May 15 11:53:58 CEST 2019


Commit: cf1a945e5ad570e9ae159b569a2a3cfc11874f98
Author: Jeroen Bakker
Date:   Wed May 15 11:51:20 2019 +0200
Branches: master
https://developer.blender.org/rBcf1a945e5ad570e9ae159b569a2a3cfc11874f98

Preferences: Default ViewportAA

Due to recent changes the default aa samples in the viewport was set to
16, but should have been 8. This is due to how the old viewport quality
setting was interpreted by the workbench engine. This patch will respect
the same way to version the viewport quality to viewport_aa as the
workbench used to do this.

===================================================================

M	source/blender/blenloader/intern/versioning_userdef.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index 30374e6c63d..909334ae26f 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -566,16 +566,16 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
     const float GPU_VIEWPORT_QUALITY_TAA16 = 0.6f;
     const float GPU_VIEWPORT_QUALITY_TAA32 = 0.8f;
 
-    if (userdef->gpu_viewport_quality < GPU_VIEWPORT_QUALITY_FXAA) {
+    if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_FXAA) {
       userdef->viewport_aa = SCE_DISPLAY_AA_OFF;
     }
-    else if (userdef->gpu_viewport_quality < GPU_VIEWPORT_QUALITY_TAA8) {
+    else if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_TAA8) {
       userdef->viewport_aa = SCE_DISPLAY_AA_FXAA;
     }
-    else if (userdef->gpu_viewport_quality < GPU_VIEWPORT_QUALITY_TAA16) {
+    else if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_TAA16) {
       userdef->viewport_aa = SCE_DISPLAY_AA_SAMPLES_8;
     }
-    else if (userdef->gpu_viewport_quality < GPU_VIEWPORT_QUALITY_TAA32) {
+    else if (userdef->gpu_viewport_quality <= GPU_VIEWPORT_QUALITY_TAA32) {
       userdef->viewport_aa = SCE_DISPLAY_AA_SAMPLES_16;
     }
     else {



More information about the Bf-blender-cvs mailing list