Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py10
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c14
2 files changed, 20 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 128e24a6d68..a5d399ee55e 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2975,12 +2975,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 b8599cf6ea8..116eb48bf88 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3120,7 +3120,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 */
@@ -3551,6 +3561,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);
}