diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-02 16:18:53 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-02 17:19:12 +0300 |
commit | b52a0c78aff3afd49c0712ee35ba01f6b48662f7 (patch) | |
tree | 3dadc3f008de4c77962299777357a6075732ce41 /source/blender/blenkernel | |
parent | 76193106d2e3d1d211af33f39a3714e22944cb18 (diff) |
Workbench,EEVEE: Viewport Render Samples
- Add `render_aa` and `viewport_aa` sampling setting for workbench. 0
samples means no AA, 1 sample uses FXAA and more samples will use
TAA.
The viewport `gpu_viewport_quality` can still limit viewport anti-aliasing
method.
- Use TAA when rendering images. (this used to be CPU based FSAA)
- Removed `R_OSA` related settings.
Reviewers: fclem, brecht
Maniphest Tasks: T60847
Differential Revision: https://developer.blender.org/D4773
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 7 |
3 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 017c15ebe41..170ab657388 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -100,8 +100,8 @@ typedef struct SeqRenderData { /* special case for OpenGL render */ struct GPUOffScreen *gpu_offscreen; - int gpu_samples; - bool gpu_full_samples; + // int gpu_samples; + // bool gpu_full_samples; } SeqRenderData; void BKE_sequencer_new_render_data(struct Main *bmain, diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 58b36aed24f..714261ce4ab 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -566,7 +566,7 @@ void BKE_scene_init(Scene *sce) sce->cursor.rotation_quaternion[0] = 1.0f; sce->cursor.rotation_axis[1] = 1.0f; - sce->r.mode = R_OSA; + sce->r.mode = 0; sce->r.cfra = 1; sce->r.sfra = 1; sce->r.efra = 250; @@ -767,7 +767,6 @@ void BKE_scene_init(Scene *sce) BLI_strncpy(sce->r.pic, U.renderdir, sizeof(sce->r.pic)); BLI_rctf_init(&sce->r.safety, 0.1f, 0.9f, 0.1f, 0.9f); - sce->r.osa = 8; /* Note; in header_info.c the scene copy happens..., * if you add more to renderdata it has to be checked there. */ @@ -905,6 +904,9 @@ void BKE_scene_init(Scene *sce) sce->display.matcap_ssao_attenuation = 1.0f; sce->display.matcap_ssao_samples = 16; + sce->display.render_aa = SCE_DISPLAY_AA_SAMPLES_8; + sce->display.viewport_aa = SCE_DISPLAY_AA_FXAA; + /* OpenGL Render. */ BKE_screen_view3d_shading_init(&sce->display.shading); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index b1a32552878..9035c7ff1ac 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -635,8 +635,6 @@ void BKE_sequencer_new_render_data(Main *bmain, r_context->is_proxy_render = false; r_context->view_id = 0; r_context->gpu_offscreen = NULL; - r_context->gpu_samples = (scene->r.mode & R_OSA) ? scene->r.osa : 0; - r_context->gpu_full_samples = (r_context->gpu_samples) && (scene->r.scemode & R_FULL_SAMPLE); } /* ************************* iterator ************************** */ @@ -2792,7 +2790,7 @@ static ImBuf *input_preprocess(const SeqRenderData *context, } if (ibuf->x != context->rectx || ibuf->y != context->recty) { - if (scene->r.mode & R_OSA) { + if (scene->display.render_aa > SCE_DISPLAY_AA_FXAA) { IMB_scaleImBuf(ibuf, (short)context->rectx, (short)context->recty); } else { @@ -3523,7 +3521,6 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, unsigned int draw_flags = V3D_OFSDRAW_NONE; draw_flags |= (use_gpencil) ? V3D_OFSDRAW_SHOW_ANNOTATION : 0; - draw_flags |= (context->gpu_full_samples) ? V3D_OFSDRAW_USE_FULL_SAMPLE : 0; draw_flags |= (context->scene->r.seq_flag & R_SEQ_OVERRIDE_SCENE_SETTINGS) ? V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS : 0; @@ -3549,7 +3546,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, IB_rect, draw_flags, scene->r.alphamode, - context->gpu_samples, + 0, /* no aa samples */ viewname, context->gpu_offscreen, err_out); |