Generate terrain on a keypress
This commit is contained in:
parent
55a134882d
commit
8ffb0a1cfe
5 changed files with 44 additions and 11 deletions
|
@ -19,5 +19,6 @@ kernel void zeroKernel(texture2d<float, access::write> outTexture [[texture(Gene
|
|||
kernel void randomKernel(texture2d<float, access::write> outTexture [[texture(GeneratorTextureIndexOut)]],
|
||||
uint2 tid [[thread_position_in_grid]])
|
||||
{
|
||||
|
||||
float x = 2.0 * M_PI_F * (tid.x / 128.0);
|
||||
outTexture.write(sin(x), tid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue