e92a8042c35b929ce20e170a12d561bfb9ab498e
The code before this change was relying on the ShadowPayload have the same "header" as RayPayload for some of the primitive types (curve, motion triangle, point): intersection functions were shared between "regular" and shadow rays (shadow in this case is shadow_all), but extra filter function was used for shadow rays. This is fragile if someone changes one of these structures. What is worse is that compiler might actually decide to shuffle things in some structs, or remove unused fields. This change also solves confusion about ShadowPayload::prim_type seemingly only being assigned to PRIMITIVE_NONE. With time it is not impossible that compiler will also see this, and constant-fold some checks, or even remove the field. If that happens then the render result will be wrong. Maybe it is already happening as there are some GPU and driver and optimization flag specific bugs in the area. It is unclear whether it was causing any actual problem: W7800 seems to render all hair correctly on Linux.
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
