This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken from GradientNoiseNode.cs from the Shader Graph package. | |
float2 GradientNoise_Dir_float(float2 p) { | |
// Permutation and hashing used in webgl-nosie goo.gl/pX7HtC | |
p = p % 289; | |
// need full precision, otherwise half overflows when p > 1 | |
float x = float(34 * p.x + 1) * p.x % 289 + p.y; | |
x = (34 * x + 1) * x % 289; | |
x = frac(x / 41) * 2 - 1; | |
return normalize(float2(x - floor(x + 0.5), abs(x) - 0.5)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Ryan Roberts - Wrap Deformer | |
rr_wrap.py | |
Description: | |
Ryan Robers created a simple function to create a wrap deformer. | |
The wrap deformer needs a little more than the deform command to get working. | |
Michael Clavan | |
I wanted to have the function also return the deformer to the user. So, my contributions are pretty minor. | |
I converted the wrap deformer into a pynode object type pm.nt.Wrap. |