0
0
forked from blender/blender
blender/intern/cycles/kernel
Weizhen Huang 9eabc20a48 Fix #126799: undefined behavior of shader node Arctan2 at (0, 0)
`atan2(0, 0)` is undefined on many platforms. To ensure consistent
result across platforms, we return `0` in this case.

Note only the behavior of the shader node `Artan2` is changed here.
During shading, we might still produce `atan2(0, 0)` internally and
cause different results across platforms, but that usually happens with
single samples and is not obvious, plus checking this condition all the
time is costly. If later we find out it's indeed necessary to change all
the invocation of `atan2(0, 0)`, we could change the wrapper functions
in `metal/compat.h` and `mtl_shader_defines.msl`.

Pull Request: blender/blender#126951
2024-09-12 15:08:41 +02:00
..
bake Fix T103094: Cycles ignores small suns in Nishita sky 2023-01-19 18:31:54 -06:00
bvh Cleanup: format (with BraceWrapping::AfterControlStatement "MultiLine") 2023-05-02 09:37:49 +10:00
camera Cleanup: comment blocks 2023-03-09 10:39:49 +11:00
closure Fix #108211: Cycles: Correctly split Glass BSDF contributions 2023-06-13 01:34:07 +02:00
device Fix various HIP RT issues 2023-06-20 20:47:10 +02:00
film Fix Cycles on Metal after the recent changes 2023-06-13 13:01:58 +02:00
geom Cleanup: format (with BraceWrapping::AfterControlStatement "MultiLine") 2023-05-02 09:37:49 +10:00
integrator Fix: Cycles MIS disabled unnecessarily with transparency, causing fireflies 2024-02-14 14:36:07 +01:00
light Fix #117771: Incorrect Cycles texture position on emissive triangles 2024-02-14 19:54:34 +01:00
osl Fix refraction BSDF color when using OSL 2023-06-05 01:01:19 +02:00
sample Fix #109907: Cycles multiscatter GGX transmission artifacts 2023-10-02 19:05:46 +02:00
svm Fix #126799: undefined behavior of shader node Arctan2 at (0, 0) 2024-09-12 15:08:41 +02:00
util Cycles: simplify handling of ray differentials 2022-08-15 13:48:02 +02:00
CMakeLists.txt Build: Upgrade Intel Graphics Compiler to 1.0.15468 on Linux 2024-03-12 12:59:15 +01:00
data_arrays.h Cycles: add instancing support in light tree 2023-04-14 19:12:16 +02:00
data_template.h Fix build error on macOS after previous commit 2023-04-17 17:47:29 +02:00
tables.h Cycles: add Sobol-Burley sampling pattern 2022-08-19 16:27:22 +02:00
types.h Fix Cycles Metal AMD crash with shadow caustics, by disabling it 2023-06-15 16:33:21 +02:00