blob: 96ff937ff453d9eab4db282d75c48809358ff718 [file] [log] [blame] [edit]
#include <metal_stdlib>
using namespace metal;
template<typename T, int N, int M>
inline vec<T, M> operator*(matrix<T, N, M> lhs, packed_vec<T, N> rhs) {
return lhs * vec<T, N>(rhs);
}
template<typename T, int N, int M>
inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
return vec<T, M>(lhs) * rhs;
}
struct Simulation {
/* 0x0000 */ uint i;
};
struct tint_array_wrapper {
/* 0x0000 */ float3 arr[8];
};
struct Particle {
/* 0x0000 */ tint_array_wrapper position;
/* 0x0080 */ float lifetime;
/* 0x0084 */ int8_t tint_pad[12];
/* 0x0090 */ float4 color;
/* 0x00a0 */ packed_float3 velocity;
/* 0x00ac */ int8_t tint_pad_1[4];
};
struct Particles {
/* 0x0000 */ Particle p[1];
};
kernel void tint_symbol(const device Particles* tint_symbol_1 [[buffer(1)]], const constant Simulation* tint_symbol_2 [[buffer(0)]]) {
Particle particle = (*(tint_symbol_1)).p[0];
particle.position.arr[(*(tint_symbol_2)).i] = particle.position.arr[(*(tint_symbol_2)).i];
return;
}