diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-20 15:32:08 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-20 15:32:08 +0400 |
commit | a384612cce4f595a3cd6fd572e8fb3a2efb151db (patch) | |
tree | f242682d74555f2c0fa4497a25e638ac365fba45 /source/blender | |
parent | aea5114633928fb1ee8ff450b2420884a88790ed (diff) |
Fix #35439: Render Border have weird influence on compositing
Issue was caused by render result passing to a compositor
was having a resolution of border when using a camera border
in cases there's no Render Layer nodes.
Made it so resolution in which compositor works does not
depend on whether Render Layers present or not.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 91244e95d3b..51fb83d010b 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1406,6 +1406,16 @@ static void do_render_fields_3d(Render *re) re->display_draw(re->ddh, re->result, NULL); } +/* make sure disprect is not affected by the render border */ +static void render_result_disprect_to_full_resolution(Render *re) +{ + re->disprect.xmin = re->disprect.ymin = 0; + re->disprect.xmax = re->winx; + re->disprect.ymax = re->winy; + re->rectx = re->winx; + re->recty = re->winy; +} + /* main render routine, no compositing */ static void do_render_fields_blur_3d(Render *re) { @@ -1438,13 +1448,8 @@ static void do_render_fields_blur_3d(Render *re) /* sub-rect for merge call later on */ re->result->tilerect = re->disprect; - /* this copying sequence could become function? */ /* weak is: it chances disprect from border */ - re->disprect.xmin = re->disprect.ymin = 0; - re->disprect.xmax = re->winx; - re->disprect.ymax = re->winy; - re->rectx = re->winx; - re->recty = re->winy; + render_result_disprect_to_full_resolution(re); rres = render_result_new(re, &re->disprect, 0, RR_USE_MEM, RR_ALL_LAYERS); @@ -1910,6 +1915,9 @@ static void do_render_composite_fields_blur_3d(Render *re) BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE); render_result_free(re->result); + if ((re->r.mode & R_CROP) == 0) { + render_result_disprect_to_full_resolution(re); + } re->result = render_result_new(re, &re->disprect, 0, RR_USE_MEM, RR_ALL_LAYERS); BLI_rw_mutex_unlock(&re->resultmutex); |