diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-04 22:13:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-04 22:15:33 +0300 |
commit | db59f30f2bf627bee61a664b28a0f97f53b7b9dd (patch) | |
tree | 189ddd9f09d40c70241bbef1a6ad0b9314759abe /intern/cycles/render/buffers.cpp | |
parent | 76b9eaf7a84ee2098c1ca1bf5cd4042c55ae76d7 (diff) |
Fix assert rendering with denoising, after recent changes.
Diffstat (limited to 'intern/cycles/render/buffers.cpp')
-rw-r--r-- | intern/cycles/render/buffers.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index dd20efb3dde..f901885e679 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -147,7 +147,7 @@ bool RenderBuffers::copy_from_device() return true; } -bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int sample, int components, float *pixels) +bool RenderBuffers::get_denoising_pass_rect(int type, float exposure, int sample, int components, float *pixels) { if(buffer.data() == NULL) { return false; @@ -155,20 +155,20 @@ bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int samp float invsample = 1.0f/sample; float scale = invsample; - bool variance = (offset == DENOISING_PASS_NORMAL_VAR) || - (offset == DENOISING_PASS_ALBEDO_VAR) || - (offset == DENOISING_PASS_DEPTH_VAR) || - (offset == DENOISING_PASS_COLOR_VAR); + bool variance = (type == DENOISING_PASS_NORMAL_VAR) || + (type == DENOISING_PASS_ALBEDO_VAR) || + (type == DENOISING_PASS_DEPTH_VAR) || + (type == DENOISING_PASS_COLOR_VAR); float scale_exposure = scale; - if(offset == DENOISING_PASS_COLOR || offset == DENOISING_PASS_CLEAN) { + if(type == DENOISING_PASS_COLOR || type == DENOISING_PASS_CLEAN) { scale_exposure *= exposure; } - else if(offset == DENOISING_PASS_COLOR_VAR) { + else if(type == DENOISING_PASS_COLOR_VAR) { scale_exposure *= exposure*exposure; } - offset += params.get_denoising_offset(); + int offset = type + params.get_denoising_offset(); int pass_stride = params.get_passes_size(); int size = params.width*params.height; @@ -212,7 +212,7 @@ bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int samp } } else if(components == 4) { - assert(offset == DENOISING_PASS_COLOR); + assert(type == DENOISING_PASS_COLOR); /* Since the alpha channel is not involved in denoising, output the Combined alpha channel. */ assert(params.passes[0].type == PASS_COMBINED); |