| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); |
| 7 |
|
| 8 |
kernel void main0(texture2d<float> uImageIn [[texture(0)]], texture2d<float, access::write> uImageOut [[texture(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) |
| 9 |
{ |
| 10 |
float4 v = uImageIn.read(uint2((int2(gl_GlobalInvocationID.xy) + int2(uImageIn.get_width(), uImageIn.get_height())))); |
| 11 |
uImageOut.write(v, uint2(int2(gl_GlobalInvocationID.xy))); |
| 12 |
} |
| 13 |
|