2021-06-17 09:10:04 +00:00
|
|
|
#include <metal_stdlib>
|
2021-06-10 18:49:14 +00:00
|
|
|
|
2021-06-17 09:10:04 +00:00
|
|
|
using namespace metal;
|
|
|
|
struct Result {
|
|
|
|
/* 0x0000 */ float values[1];
|
|
|
|
};
|
2021-06-10 18:49:14 +00:00
|
|
|
|
2021-06-17 09:10:04 +00:00
|
|
|
constant uint width = 128u;
|
2021-08-04 22:15:28 +00:00
|
|
|
void tint_symbol_inner(device Result& result, uint3 GlobalInvocationId, depth2d<float, access::sample> tint_symbol_1) {
|
2021-10-20 16:12:33 +00:00
|
|
|
result.values[((GlobalInvocationId[1] * width) + GlobalInvocationId[0])] = tint_symbol_1.read(uint2(int2(int(GlobalInvocationId[0]), int(GlobalInvocationId[1]))), 0);
|
2021-08-04 22:15:28 +00:00
|
|
|
}
|
|
|
|
|
2021-08-12 19:47:20 +00:00
|
|
|
kernel void tint_symbol(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]], device Result& result [[buffer(0)]]) {
|
2021-08-04 22:15:28 +00:00
|
|
|
tint_symbol_inner(result, GlobalInvocationId, tint_symbol_2);
|
2021-06-17 09:10:04 +00:00
|
|
|
return;
|
|
|
|
}
|
2021-06-10 18:49:14 +00:00
|
|
|
|