fbc770d58bca8343a5e22999729e1a108b3ddf8a
This fixes #69535 and #98930. We use a equi-solid-angle sampling algorithm for rectangular area lights, but it is not particularly robust for small area lights (either small in general and/or small because it's being viewed from grazing angles). The actual sampling part is fine since it just gets clamped into the valid area anyways, and the difference isn't notable for small lights. However, we also need to compute the solid angle to get the sampling PDF, and that computation is quite sensitive to numerical issues for small values. Therefore, this commit adds a fallback path for small values, which instead uses the classic equi-area sampling PDF term times the area-to-solid-angle Jacobian term. This approximation assumes that all points on the light have the same distance and angle to the sampling point, which is of course not strictly the case, but it's close enough for small area lights and better than failing altogether. Pull Request: https://projects.blender.org/blender/blender/pulls/122323
…
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%
