Update noise3Dgrad.glsl
Rescaled output values after previous bug fix, to again cover the range -1 to 1 reasonably wellmaster
parent
21d9fe23d7
commit
df98cfa230
|
@ -105,7 +105,7 @@ float snoise(vec3 v, out vec3 gradient)
|
|||
vec4 temp = m2 * m * pdotx;
|
||||
gradient = -8.0 * (temp.x * x0 + temp.y * x1 + temp.z * x2 + temp.w * x3);
|
||||
gradient += m4.x * p0 + m4.y * p1 + m4.z * p2 + m4.w * p3;
|
||||
gradient *= 42.0;
|
||||
gradient *= 105.0;
|
||||
|
||||
return 42.0 * dot(m4, pdotx);
|
||||
return 105.0 * dot(m4, pdotx);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue