Skip to content

Instantly share code, notes, and snippets.

@keijiro keijiro/prng.cginc
Last active Oct 6, 2018

Embed
What would you like to do?
One liner pseudo random generator with HLSL
float nrand(float2 uv)
{
return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.