24 строки
460 B
Plaintext
24 строки
460 B
Plaintext
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
struct SSBO
|
|
{
|
|
float4 data;
|
|
int index;
|
|
};
|
|
|
|
kernel void main0(device SSBO& _13 [[buffer(0)]])
|
|
{
|
|
float4 d = _13.data;
|
|
_13.data = float4(d.x, d.yz + float2(10.0), d.w);
|
|
_13.data = (d + d) + d;
|
|
_13.data = (d.yz + float2(10.0)).xxyy;
|
|
float t = (d.yz + float2(10.0)).y;
|
|
_13.data = float4(t);
|
|
t = (d.zw + float2(10.0))[_13.index];
|
|
_13.data = float4(t);
|
|
}
|
|
|