Remove RandomGenerator

This commit is contained in:
Eryn Wells 2018-11-21 08:57:59 -07:00
parent 4e5dfcf20b
commit 261a768ae5
3 changed files with 7 additions and 49 deletions

View file

@ -93,14 +93,3 @@ kernel void zeroKernel(texture2d<float, access::write> outTexture [[texture(Gene
outTexture.write(0, tid);
}
#pragma mark - RandomGenerator
kernel void randomKernel(texture2d<float, access::write> outTexture [[texture(GeneratorTextureIndexOut)]],
constant RandomAlgorithmUniforms &uniforms [[buffer(0)]],
uint2 tid [[thread_position_in_grid]])
{
PRNG rng(uniforms.randoms[(tid.x * tid.y) % kRandomAlgorithmUniforms_RandomCount]);
uint r = rng.xorShift();
float x = float(r * (1.0 / float(UINT_MAX))) * 0.5f;
outTexture.write(x, tid);
}