blender/intern
Sergey Sharybin 02b5c04b2b Fix intersection distance offset in Cycles
The intersection distance offset in Cycles could have returned
a denormal floating point value for the input values of 0 (and
for the denormal input value).

This could lead to a situation when ray is unable to be advanced
when it hits an edge between two triangles: the intersection will
keep bouncing between two adjacent triangles. This is because the
ray->tmin is compared inclusively, and 0 >= <denormal zero>.

The solution is to return the smallest possible normalized floating
point value from the intersection_t_offset if the input is zero
or a denormal value (which is covered by the same t == 0 check).

This fix is hard to measure on the user level. The old code did
not cause any infinite traversal loop because of the way how the
integration is organized (some kernels offset ray.P, others check
for the number of bounces). It is possible that this fixes some
corner cases of noise: i.e. if some shadow rays falsefully were
considered occluded due to reached maximum number of bounces.

The actual problematic case was discovered during working on a
prototype which had an in-lined intersection loop with the ray
tmin offset.

Pull Request: https://projects.blender.org/blender/blender/pulls/107364
2023-04-26 11:36:37 +02:00
..
atomic Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
audaspace CMake: fix AUDASPACE disabling WITH_PYTHON for Blender 2022-05-20 11:18:49 +10:00
clog File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
cycles Fix intersection distance offset in Cycles 2023-04-26 11:36:37 +02:00
dualcon Fix set but unused variable in dualcon octree 2023-04-19 10:02:09 +02:00
eigen Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
ffmpeg Cleanup: comment blocks, #if 0 commented code 2023-04-14 13:51:38 +10:00
ghost Vulkan: Construct a Vulkan 1.2 Context. 2023-04-24 15:32:17 +02:00
guardedalloc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
iksolver Fix set but unused variable in IK solver 2023-04-19 10:02:09 +02:00
itasc Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
libc_compat Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
libmv Fix set but unused variable in Libmv 2023-04-19 10:02:09 +02:00
locale Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
mantaflow Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
memutil Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
mikktspace Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
opencolorio GPU: Refactor texture samplers 2023-04-04 15:16:07 +02:00
opensubdiv Fix unqualified access to std::move in OpenSubdiv 2023-04-19 10:02:09 +02:00
openvdb Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
quadriflow Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
renderdoc_dynload Cleanup: format 2023-04-19 08:02:42 +10:00
rigidbody Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
sky Cleanup: use C-style code comments, format 2023-03-03 16:29:22 +11:00
utfconv Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00
wayland_dynload GHOST/Wayland: improve workaround for libdecor setting the window state 2022-11-16 12:31:29 +11:00
CMakeLists.txt Remove "All Rights Reserved" from Blender Foundation copyright code 2023-03-30 10:51:59 +02:00