random numbers in hlsl code example
Example: HLSL generate random number
float rand(float2 co) {
return(frac(sin(dot(co.xy, float2(12.9898, 78.233))) * 43758.5453)) * 1;
}
float rand(float2 co) {
return(frac(sin(dot(co.xy, float2(12.9898, 78.233))) * 43758.5453)) * 1;
}