diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-10 07:03:03 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-10 08:27:19 +0300 |
commit | 07d0a87b5c20dfc4a404f2354325b91ff21653b2 (patch) | |
tree | 53c5e9f0ca0b62800359c7ff638af36c5e7bbc20 | |
parent | 50dde3d01ac5076cf42a0523d9eab4aac917a990 (diff) |
Fix T54278: volume artifacts with small density and color after recent changes.
-rw-r--r-- | intern/cycles/kernel/geom/geom_volume.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/geom/geom_volume.h b/intern/cycles/kernel/geom/geom_volume.h index 286d898992e..a4e47384b25 100644 --- a/intern/cycles/kernel/geom/geom_volume.h +++ b/intern/cycles/kernel/geom/geom_volume.h @@ -68,7 +68,7 @@ ccl_device float3 volume_attribute_float3(KernelGlobals *kg, const ShaderData *s if(dx) *dx = make_float3(0.0f, 0.0f, 0.0f); if(dy) *dy = make_float3(0.0f, 0.0f, 0.0f); - if(r.w != 0.0f && r.w != 1.0f) { + if(r.w > 1e-8f && r.w != 1.0f) { /* For RGBA colors, unpremultiply after interpolation. */ return float4_to_float3(r) / r.w; } |