Fix T61831: Denoising Clean pass not scaled correctly with samples.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 11 Mar 2019 08:13:46 +0000 (09:13 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 11 Mar 2019 13:26:06 +0000 (14:26 +0100)
intern/cycles/render/buffers.cpp

index 66b8ef7..c81eafd 100644 (file)
@@ -184,6 +184,7 @@ bool RenderBuffers::get_denoising_pass_rect(int type, float exposure, int sample
        if(type == DENOISING_PASS_CLEAN) {
                /* The clean pass isn't changed by prefiltering, so we use the original one there. */
                offset = type + params.get_denoising_offset();
+               scale /= sample;
        }
        else if (type == DENOISING_PASS_PREFILTERED_COLOR && !params.denoising_prefiltered_pass) {
                /* If we're not saving the prefiltering result, return the original noisy pass. */