Blender Git Loki

Git Commits -> Revision 074c00f

Revision 074c00f by Bartosz Moniewski (master)
December 7, 2019, 18:06 (GMT)
Shaders: noise and wave distortion now work uniformly instead of diagonally

Previously Noise and Wave texture nodes would use noise functions within a [0,1]
range for distortion effects. We either add or subtract noise from coordinates,
never do both at same time. This led to the texture drastically shifting on the
diagonal axis of a plane / cube. This behavior makes the Distortion input hard
to control or animate. Capabilities of driving it with other texture are also
limited, diagonal shifting is very apparent.

This was fixed by offsetting the noise function to a signed range and making it
zero-centered. This way noise is uniformly added and subtracted from coordinates.
Texture pattern sticks to main coordinates which makes it way easier to control.

This change is not strictly backwards compatible, there is versioning to ensure
the scale of the distortion remains similar, but the particular pattern can be
a little different.

Differential Revision: https://developer.blender.org/D6177

Commit Details:

Full Hash: 074c00f9d6cc720461e6c8c7c13ed4e408ef372e
Parent Commit: 9c11340
Committed By: Brecht Van Lommel
Lines Changed: +87, -33

7 Modified Paths:

/intern/cycles/kernel/shaders/node_noise_texture.osl (+10, -10) (Diff)
/intern/cycles/kernel/shaders/node_wave_texture.osl (+1, -1) (Diff)
/intern/cycles/kernel/svm/svm_noisetex.h (+10, -10) (Diff)
/intern/cycles/kernel/svm/svm_wave.h (+1, -1) (Diff)
/source/blender/blenloader/intern/versioning_cycles.c (+54, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_noise.glsl (+10, -10) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_wave.glsl (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021