Blender Git Loki
Git Commits -> Revision 57f46b9
Revision 57f46b9 by William Leeson (master) December 10, 2021, 08:09 (GMT) |
Fix T92036: `Magic Texture` in Volumetric World Shaders render differently with the CPU and GPU When rendering volume surfaces in unbounded worlds the volume stepping can produce large values. If used with a magic texture node the values can results in a Inf float which when used in a sin or cos produces a NaN. To fix this the input values are mapped into the periodic range of the sin and cos functions (-2*PI 2*PI) this stops the possibility of a Inf occurring and thus the NaN. It also improves the accuracy and smoothness of the result due to loss of precision when large values are summed with smaller ones effectively removing the parts of the smaller number (i.e. those in the -2PI to 2PI range) that result in variation of the output of sin and cos. Reviewed By: brecht Maniphest Tasks: T92036 Differential Revision: https://developer.blender.org/D12821 |
Commit Details:
Full Hash: 57f46b9d5f370dfacc92786dab596060400a21a8
Parent Commit: 566a458
Lines Changed: +32, -12