diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-04 21:48:41 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-04 21:48:41 +0300 |
commit | 77047d2088016140da2669fcda9ba2a23336e14b (patch) | |
tree | 4464cd01a2a0a37fc1ec5026bad25380719b8971 /intern/cycles | |
parent | dd4c47314e7550da58753c41d0e22fd3762a7fba (diff) | |
parent | bae2ce069516f7e4524fb5a514afef4d9da32a0e (diff) |
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/sync.cpp | 10 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/motion_triangle_shader.h | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/integrator/volume_stack.h | 4 |
3 files changed, 14 insertions, 6 deletions
diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp index 63e9e1e0e68..429a8e665af 100644 --- a/intern/cycles/blender/sync.cpp +++ b/intern/cycles/blender/sync.cpp @@ -412,7 +412,15 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background) integrator->set_direct_light_sampling_type(direct_light_sampling_type); #endif - const DenoiseParams denoise_params = get_denoise_params(b_scene, b_view_layer, background); + DenoiseParams denoise_params = get_denoise_params(b_scene, b_view_layer, background); + + /* No denoising support for vertex color baking, vertices packed into image + * buffer have no relation to neighbors. */ + if (scene->bake_manager->get_baking() && + b_scene.render().bake().target() != BL::BakeSettings::target_IMAGE_TEXTURES) { + denoise_params.use = false; + } + integrator->set_use_denoise(denoise_params.use); /* Only update denoiser parameters if the denoiser is actually used. This allows to tweak diff --git a/intern/cycles/kernel/geom/motion_triangle_shader.h b/intern/cycles/kernel/geom/motion_triangle_shader.h index 236e737b785..413a61b380a 100644 --- a/intern/cycles/kernel/geom/motion_triangle_shader.h +++ b/intern/cycles/kernel/geom/motion_triangle_shader.h @@ -68,8 +68,8 @@ ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals kg, sd->N = Ng; /* Compute derivatives of P w.r.t. uv. */ #ifdef __DPDU__ - sd->dPdu = (verts[0] - verts[2]); - sd->dPdv = (verts[1] - verts[2]); + sd->dPdu = (verts[1] - verts[0]); + sd->dPdv = (verts[2] - verts[0]); #endif /* Compute smooth normal. */ if (sd->shader & SHADER_SMOOTH_NORMAL) { @@ -89,7 +89,7 @@ ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals kg, float u = sd->u; float v = sd->v; float w = 1.0f - u - v; - sd->N = (u * normals[0] + v * normals[1] + w * normals[2]); + sd->N = (w * normals[0] + u * normals[1] + v * normals[2]); } } diff --git a/intern/cycles/kernel/integrator/volume_stack.h b/intern/cycles/kernel/integrator/volume_stack.h index 97a0f0f386c..675e1927fc0 100644 --- a/intern/cycles/kernel/integrator/volume_stack.h +++ b/intern/cycles/kernel/integrator/volume_stack.h @@ -39,7 +39,7 @@ ccl_device void volume_stack_enter_exit(KernelGlobals kg, break; } - if (entry.object == sd->object) { + if (entry.object == sd->object && entry.shader == sd->shader) { /* Shift back next stack entries. */ do { entry = stack_read(i + 1); @@ -61,7 +61,7 @@ ccl_device void volume_stack_enter_exit(KernelGlobals kg, } /* Already in the stack? then we have nothing to do. */ - if (entry.object == sd->object) { + if (entry.object == sd->object && entry.shader == sd->shader) { return; } } |