diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-23 21:16:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-23 21:16:11 +0300 |
commit | 4f8bffa7bfe46192b43c75d864e2117369cbffdd (patch) | |
tree | 3e869e57151f4d487106d59bba1f2282a9578a44 /intern/cycles/render | |
parent | b79b8478ee3bb1b115c5d6b8bdb0cc74d5169955 (diff) | |
parent | debd9f6ea1286533d4d5c9262fa6724c862fe35e (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/buffers.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index 7d4c3325a15..c6502df7252 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -236,10 +236,17 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int int size = params.width*params.height; - if(components == 1) { + if(components == 1 && type == PASS_RENDER_TIME) { + /* Render time is not stored by kernel, but measured per tile. */ + float val = (float) (1000.0 * render_time/(params.width * params.height * sample)); + for(int i = 0; i < size; i++, pixels++) { + pixels[0] = val; + } + } + else if(components == 1) { assert(pass.components == components); - /* scalar */ + /* Scalar */ if(type == PASS_DEPTH) { for(int i = 0; i < size; i++, in += pass_stride, pixels++) { float f = *in; @@ -264,12 +271,6 @@ bool RenderBuffers::get_pass_rect(PassType type, float exposure, int sample, int } } #endif - else if(type == PASS_RENDER_TIME) { - float val = (float) (1000.0 * render_time/(params.width * params.height * sample)); - for(int i = 0; i < size; i++, pixels++) { - pixels[0] = val; - } - } else { for(int i = 0; i < size; i++, in += pass_stride, pixels++) { float f = *in; |