diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-08-04 19:57:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-04 20:02:25 +0300 |
commit | 91d365f6df51333757a47b8c18cfd9faae974982 (patch) | |
tree | 19969cc023bc1550286b06e7f6c957e1fa86ece5 /intern/cycles/kernel | |
parent | 11b4d0a3c3787a90e6f1631f7735d0968afbb20a (diff) |
Fix T100205: Cycles wrong volume shading with two materials in object
Assume that all faces using the smae material form a closed mesh, so that
joining meshes gives the same result as separate meshes.
It does mean that using different materials on different sides of one
closed mesh do not work, but the meaning of that is poorly defined anyway
if there is a volume interior.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/integrator/volume_stack.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; } } |