Blender Git Commit Log

Git Commits -> Revision 6c87aa8

August 8, 2019, 12:33 (GMT)
Remove magic numbers and swizzling from Noise code.

Previously, we used a random swizzling pattern as a sort of seed for noise, this proved bad in a lot of cases, including the cases where some of the components are constants. Additionally, we also added some offsets from a set of "magic numbers" as a form of seed. Those magic numbers are bad practice, so we introduced some new functions to generate random offsets based on the hash functions we already have, this happens at compile time, so this has no effect on performance.

Commit Details:

Full Hash: 6c87aa858bf0f756560949b25c1afc9c6a887996
Parent Commit: 1e3effc
Lines Changed: +161, -74

3 Modified Paths:

/intern/cycles/kernel/shaders/node_noise_texture.osl (+52, -25) (Diff)
/intern/cycles/kernel/svm/svm_noisetex.h (+52, -26) (Diff)
/source/blender/gpu/shaders/gpu_shader_material.glsl (+57, -23) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021