Unity/shader

랜덤 쉐이더

모카쨩 2021. 12. 29. 23:34

 

 

 

https://www.shadertoy.com/view/4djSRW

 

Shadertoy

 

www.shadertoy.com

더보기

hashOld12의 패턴

float hashOld12(float2 p)
{
    return sin(dot(p, float2(100, 100)));
}

 

 

 

hash12의 패턴

float hash12(float2 p)
{
    float3 p3 = sin(float3(p.xyx) );
    p3 += dot(p3, p3.yzx );
    return sin((p3.x + p3.y) * p3.z);
}

편향랜덤이라서 안 쓰는게 좋을듯

 

 

 

 

 

 

 

 

 

noise(floatM|halfM|min10floatM|min16floatM)