diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-05 02:30:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-05 02:30:33 +0300 |
commit | 1e56c8c47deae730269d7d3e48243ae1c79e6153 (patch) | |
tree | c7dcd372a1fdaac98f120316b9d01014166fa1b4 | |
parent | 4e37796976f9cbea24f3e94e0145cf280a5918f9 (diff) | |
parent | b98f76cd90a14d500fb9a059b95aa32c3ab9e6e4 (diff) |
Merge branch 'master' into blender2.8
4 files changed, 14 insertions, 13 deletions
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py index 778aa2dba8d..0b74150f981 100644 --- a/intern/cycles/blender/addon/engine.py +++ b/intern/cycles/blender/addon/engine.py @@ -269,7 +269,7 @@ def register_passes(engine, scene, srl): engine.register_pass(scene, srl, "CryptoAsset" + '{:02d}'.format(i), 4, "RGBA", 'COLOR') if crl.use_denoising or crl.denoising_store_passes: - engine.register_pass(scene, srl, "Noisy Image", 3, "RGBA", 'COLOR') + engine.register_pass(scene, srl, "Noisy Image", 4, "RGBA", 'COLOR') if crl.denoising_store_passes: engine.register_pass(scene, srl, "Denoising Normal", 3, "XYZ", 'VECTOR') engine.register_pass(scene, srl, "Denoising Normal Variance", 3, "XYZ", 'VECTOR') diff --git a/intern/cycles/kernel/closure/bsdf_hair_principled.h b/intern/cycles/kernel/closure/bsdf_hair_principled.h index b3b56be39ff..720517380ce 100644 --- a/intern/cycles/kernel/closure/bsdf_hair_principled.h +++ b/intern/cycles/kernel/closure/bsdf_hair_principled.h @@ -296,7 +296,7 @@ ccl_device float3 bsdf_principled_hair_eval(KernelGlobals *kg, float3 Y = float4_to_float3(bsdf->extra->geom); float3 X = safe_normalize(sd->dPdu); - kernel_assert(fabsf(dot(X, Y)) < 1e-4f); + kernel_assert(fabsf(dot(X, Y)) < 1e-3f); float3 Z = safe_normalize(cross(X, Y)); float3 wo = make_float3(dot(sd->I, X), dot(sd->I, Y), dot(sd->I, Z)); @@ -378,7 +378,7 @@ ccl_device int bsdf_principled_hair_sample(KernelGlobals *kg, float3 Y = float4_to_float3(bsdf->extra->geom); float3 X = safe_normalize(sd->dPdu); - kernel_assert(fabsf(dot(X, Y)) < 1e-4f); + kernel_assert(fabsf(dot(X, Y)) < 1e-3f); float3 Z = safe_normalize(cross(X, Y)); float3 wo = make_float3(dot(sd->I, X), dot(sd->I, Y), dot(sd->I, Z)); diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index 0318834ff33..b4e3c18e894 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); diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 610b81c97a5..14b638da545 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -100,7 +100,8 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str freestyle_scene->r.tiley = old_scene->r.tiley; freestyle_scene->r.size = 100; // old_scene->r.size freestyle_scene->r.color_mgt_flag = 0; // old_scene->r.color_mgt_flag; - freestyle_scene->r.scemode = old_scene->r.scemode & ~(R_SINGLE_LAYER | R_NO_FRAME_UPDATE | R_MULTIVIEW); + freestyle_scene->r.scemode = (old_scene->r.scemode & ~(R_SINGLE_LAYER | R_NO_FRAME_UPDATE | R_MULTIVIEW)) & + (re->r.scemode | ~R_FULL_SAMPLE); freestyle_scene->r.flag = old_scene->r.flag; freestyle_scene->r.threads = old_scene->r.threads; freestyle_scene->r.border.xmin = old_scene->r.border.xmin; |