[Bf-blender-cvs] [07e815d] blender-v2.74-release: Fix T44076, SSAO in solid mode will disable antialiasing in wireframe mode.

Antony Riakiotakis noreply at git.blender.org
Tue Mar 24 15:59:49 CET 2015


Commit: 07e815df4bd4ad28065f19d7025623f9fc53faed
Author: Antony Riakiotakis
Date:   Mon Mar 23 18:54:56 2015 +0100
Branches: blender-v2.74-release
https://developer.blender.org/rB07e815df4bd4ad28065f19d7025623f9fc53faed

Fix T44076, SSAO in solid mode will disable antialiasing in wireframe
mode.

Yes it will, because those modes stay active. So on user side, expose
depth of field option always (I don't see why not), but disable SSAO in
wireframe/bounding box mode. It is a known limitation that compositing
does not support antialiasing yet, but better give users some more
control.

This could be included in final release but it's not that serious
either.

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

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/space_view3d/view3d_draw.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 10e7d89..2d7d2f4 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2970,12 +2970,14 @@ class VIEW3D_PT_view3d_shading(Panel):
             if obj and obj.mode == 'EDIT':
                 col.prop(view, "show_occlude_wire")
 
-            fx_settings = view.fx_settings
 
-            sub = col.column()
-            sub.active = view.region_3d.view_perspective == 'CAMERA'
-            sub.prop(fx_settings, "use_dof")
+        fx_settings = view.fx_settings
 
+        sub = col.column()
+        sub.active = view.region_3d.view_perspective == 'CAMERA'
+        sub.prop(fx_settings, "use_dof")
+
+        if view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'}:
             col.prop(fx_settings, "use_ssao", text="Ambient Occlusion")
             if fx_settings.use_ssao:
                 ssao_settings = fx_settings.ssao
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 58ef918..f871d36 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3118,7 +3118,17 @@ void ED_view3d_draw_offscreen(
 
 	/* framebuffer fx needed, we need to draw offscreen first */
 	if (v3d->fx_settings.fx_flag && fx) {
+		GPUSSAOSettings *ssao = NULL;
+
+		if (v3d->drawtype < OB_SOLID) {
+			ssao = v3d->fx_settings.ssao;
+			v3d->fx_settings.ssao = NULL;
+		}
+
 		do_compositing = GPU_fx_compositor_initialize_passes(fx, &ar->winrct, NULL, fx_settings);
+
+		if (ssao)
+			v3d->fx_settings.ssao = ssao;
 	}
 
 	/* clear opengl buffers */
@@ -3549,6 +3559,10 @@ static void view3d_main_area_draw_objects(const bContext *C, Scene *scene, View3
 		else {
 			fx_settings.dof = NULL;
 		}
+
+		if (v3d->drawtype < OB_SOLID)
+			fx_settings.ssao = NULL;
+
 		do_compositing = GPU_fx_compositor_initialize_passes(rv3d->compositor, &ar->winrct, &ar->drawrct, &fx_settings);
 	}




More information about the Bf-blender-cvs mailing list