在shader中使用随机数
//返回范围都是0~1float Random(float n,float factor = 10000){ return frac(sin(n)*factor)*frac(cos(n)*factor);}float Random(float2 n){ float r = sin(dot(n, half2(1233.224, 1743.335))); r = frac(43758.5453 * r + 0.61432); r = frac(43758.5453 * r