diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-11-19 15:16:14 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-11-19 15:16:14 +0300 |
commit | 7f96323cd001bc7555d0f145027e3bbbbc1462b8 (patch) | |
tree | 842a4ac4095be5c22bd0a505612c731351839a29 /intern/cycles/render/buffers.cpp | |
parent | 4de142e0b7ba014a3e1e41672600aa38465f2454 (diff) | |
parent | 3133d2d58c391544a48342860120336e2a0f944e (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/render/buffers.cpp')
-rw-r--r-- | intern/cycles/render/buffers.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index d76eaf793b4..7d4c3325a15 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -116,7 +116,7 @@ RenderTile::RenderTile() RenderBuffers::RenderBuffers(Device *device) : buffer(device, "RenderBuffers", MEM_READ_WRITE), - map_neighbor_copied(false) + map_neighbor_copied(false), render_time(0.0f) { } @@ -264,6 +264,12 @@ 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; |