mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 19:23:28 +01:00
add missing 4 comp hash variants
This commit is contained in:
parent
69a04cbd7e
commit
b520811e72
@ -142,6 +142,16 @@ float hash13(vec3 p3)
|
||||
return fract((p3.x + p3.y) * p3.z);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// TODO: test properly
|
||||
// 1 out, 4 in...
|
||||
float hash14(vec4 p4)
|
||||
{
|
||||
p4 = fract(p4 * .1031);
|
||||
p4 += dot(p4, p4.zywx + 31.32);
|
||||
return fract((p4.x + p4.y + p4.w) * p4.z);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// 2 out, 1 in...
|
||||
vec2 hash21(float p)
|
||||
@ -169,6 +179,16 @@ vec2 hash23(vec3 p3)
|
||||
return fract((p3.xx+p3.yz)*p3.zy);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// TODO: test properly
|
||||
// 2 out, 4 in...
|
||||
vec2 hash24(vec4 p4)
|
||||
{
|
||||
p4 = fract(p4 * vec4(.1031, .1030, .0973, .1337));
|
||||
p4 += dot(p4, p4.ywzx+33.33);
|
||||
return fract((p4.wx+p4.yz)*p4.zy);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
// 3 out, 1 in...
|
||||
vec3 hash31(float p)
|
||||
|
Loading…
Reference in New Issue
Block a user