diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-24 14:19:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-27 14:21:21 +0300 |
commit | 9b42b3e11462e96bf24970971ab181122c6b33df (patch) | |
tree | 07eb7bf0d3b0c8d9c428a7f080709a8c286c379c /source/blender/editors/space_view3d/view3d_draw.c | |
parent | 37fc23dd9e7738de7187e889f058cda845544ffb (diff) |
Sequencer: Add option to render OpenGL preview with DoF
The title says it all actually, controlled with DoF check box next to textured
solid check box.
Thanks Campbell for review!
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 8fd38d6a8de..9e220f4b141 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -3473,15 +3473,22 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple( v3d.lay = scene->lay; v3d.drawtype = drawtype; v3d.flag2 = V3D_RENDER_OVERRIDE; - - if (draw_flags & V3D_OFSDRAW_USE_GPENCIL) - v3d.flag2 |= V3D_SHOW_GPENCIL; - if (draw_flags & V3D_OFSDRAW_USE_SOLID_TEX) + if (draw_flags & V3D_OFSDRAW_USE_GPENCIL) { + v3d.flag2 |= V3D_SHOW_GPENCIL; + } + if (draw_flags & V3D_OFSDRAW_USE_SOLID_TEX) { v3d.flag2 |= V3D_SOLID_TEX; - - if (draw_flags & V3D_OFSDRAW_USE_BACKGROUND) + } + if (draw_flags & V3D_OFSDRAW_USE_BACKGROUND) { v3d.flag3 |= V3D_SHOW_WORLD; + } + if (draw_flags & V3D_OFSDRAW_USE_CAMERA_DOF) { + if (camera->type == OB_CAMERA) { + v3d.fx_settings.dof = &((Camera *)camera->data)->gpu_dof; + v3d.fx_settings.fx_flag |= GPU_FX_FLAG_DOF; + } + } rv3d.persp = RV3D_CAMOB; |