Debian Codegraph @

third_party/rust/metal/examples/shader-dylib/test_shader.metal

raw
1 #include <metal_stdlib>
2
3 using namespace metal;
4
5 extern float4 get_color_test(float4 inColor);
6
7 kernel void test_kernel(
8 texture2d<float, access::write> image [[texture(0)]],
9 uint2 coordinates [[thread_position_in_grid]],
10 uint2 size [[threads_per_grid]])
11 {
12 float2 uv = float2(coordinates) / float2(size - 1);
13 image.write(get_color_test(float4(uv, 0.0, 1.0)), coordinates);
14 }