Proof of concept for Algorithm objects
Next up compute kernel dispatch!
This commit is contained in:
parent
96730ecd41
commit
55a134882d
6 changed files with 160 additions and 34 deletions
23
Terrain2/TerrainAlgorithms.metal
Normal file
23
Terrain2/TerrainAlgorithms.metal
Normal file
|
@ -0,0 +1,23 @@
|
|||
//
|
||||
// TerrainAlgorithms.metal
|
||||
// Terrain2
|
||||
//
|
||||
// Created by Eryn Wells on 11/4/18.
|
||||
// Copyright © 2018 Eryn Wells. All rights reserved.
|
||||
//
|
||||
|
||||
#include <metal_stdlib>
|
||||
#include "ShaderTypes.h"
|
||||
using namespace metal;
|
||||
|
||||
kernel void zeroKernel(texture2d<float, access::write> outTexture [[texture(GeneratorTextureIndexOut)]],
|
||||
uint2 tid [[thread_position_in_grid]])
|
||||
{
|
||||
outTexture.write(0, tid);
|
||||
}
|
||||
|
||||
kernel void randomKernel(texture2d<float, access::write> outTexture [[texture(GeneratorTextureIndexOut)]],
|
||||
uint2 tid [[thread_position_in_grid]])
|
||||
{
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue