| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
fragment void main0(texture2d_ms<float> uImageMS [[texture(0)]], texture2d_array<float, access::read_write> uImageArray [[texture(1)]], texture2d<float, access::write> uImage [[texture(2)]]) |
| 7 |
{ |
| 8 |
float4 a = uImageMS.read(uint2(int2(1, 2)), 2); |
| 9 |
float4 b = uImageArray.read(uint2(int3(1, 2, 4).xy), uint(int3(1, 2, 4).z)); |
| 10 |
uImage.write(a, uint2(int2(2, 3))); |
| 11 |
uImageArray.write(b, uint2(int3(2, 3, 7).xy), uint(int3(2, 3, 7).z)); |
| 12 |
} |
| 13 |
|