diff options
author | William Leeson <leesonw> | 2021-12-10 11:02:55 +0300 |
---|---|---|
committer | William Leeson <william@blender.org> | 2021-12-10 11:09:20 +0300 |
commit | 57f46b9d5f370dfacc92786dab596060400a21a8 (patch) | |
tree | 0f0f1e8300ee3311629ab55c88ed094c8b613d51 /intern/cycles/kernel/camera | |
parent | 566a458950ee30f60400a7624746342d19cf9695 (diff) |
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
Diffstat (limited to 'intern/cycles/kernel/camera')
0 files changed, 0 insertions, 0 deletions