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;
|
2022-02-09 23:55:51 +00:00
|
|
|
|
2021-10-28 15:00:39 +00:00
|
|
|
void tint_symbol_inner(uint3 GlobalInvocationId, device Result* const tint_symbol_1, depth2d<float, access::sample> tint_symbol_2) {
|
|
|
|
(*(tint_symbol_1)).values[((GlobalInvocationId[1] * width) + GlobalInvocationId[0])] = tint_symbol_2.read(uint2(int2(int(GlobalInvocationId[0]), int(GlobalInvocationId[1]))), 0);
|
2021-08-04 22:15:28 +00:00
|
|
|
}
|
|
|
|
|
2021-10-28 15:00:39 +00:00
|
|
|
kernel void tint_symbol(device Result* tint_symbol_3 [[buffer(0)]], depth2d<float, access::sample> tint_symbol_4 [[texture(0)]], uint3 GlobalInvocationId [[thread_position_in_grid]]) {
|
|
|
|
tint_symbol_inner(GlobalInvocationId, tint_symbol_3, tint_symbol_4);
|
2021-06-17 09:10:04 +00:00
|
|
|
return;
|
|
|
|
}
|
2021-06-10 18:49:14 +00:00
|
|
|
|