1
0
Fork 0
firefox/third_party/rust/metal/examples/shader-dylib/test_shader.metal
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

14 lines
395 B
Metal

#include <metal_stdlib>
using namespace metal;
extern float4 get_color_test(float4 inColor);
kernel void test_kernel(
texture2d<float, access::write> image [[texture(0)]],
uint2 coordinates [[thread_position_in_grid]],
uint2 size [[threads_per_grid]])
{
float2 uv = float2(coordinates) / float2(size - 1);
image.write(get_color_test(float4(uv, 0.0, 1.0)), coordinates);
}