demotool/shaders/lib/utils.glsl

12 lines
253 B
Text
Raw Normal View History

2017-10-04 18:40:15 +02:00
//! type library
// -----------------------------------------------------------------------------
float M_Hash( in vec2 p )
{
p = fract(p * vec2(5.3987, 5.4421));
p += dot(p.yx, p.xy + vec2(21.5351, 14.3137));
return fract(p.x * p.y * 95.4307);
}