Blender Git Loki

Git Commits -> Revision 7fcb6bc

Revision 7fcb6bc by Lukas Stockner (master)
July 8, 2020, 00:15 (GMT)
Fix T78324: Different Sky Texture results between CPU and GPU

The problem here was numerical precision: The code calculates the angle between
sun and view direction, and the usual acos(dot(a, b)) approach for that has
poor numerical performance for almost parallel angles.

As a result, the generally tiny difference between floating point computation
between CPU and GPU was enough to make the sun vanish at different radii,
causing different results.

The new version fixes the difference by making the computation much more robust
on both platforms.

Commit Details:

Full Hash: 7fcb6bc59c85beab36dbfcec91d0cfaf5291f029
Parent Commit: afcb41a
Lines Changed: +17, -2

3 Modified Paths:

/intern/cycles/kernel/shaders/node_sky_texture.osl (+6, -1) (Diff)
/intern/cycles/kernel/svm/svm_sky.h (+1, -1) (Diff)
/intern/cycles/util/util_math.h (+10, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021