2019-07-23 14:25:19 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
|
|
|
|
typedef packed_float3 packed_rm_float3x3[3];
|
|
|
|
|
|
|
|
struct SSBOScalar
|
|
|
|
{
|
|
|
|
packed_float3 a;
|
|
|
|
packed_rm_float3x3 b;
|
|
|
|
packed_rm_float3x3 c;
|
|
|
|
};
|
|
|
|
|
2023-01-11 21:34:44 +00:00
|
|
|
kernel void main0(device SSBOScalar& _6 [[buffer(0)]])
|
2019-07-23 14:25:19 +00:00
|
|
|
{
|
2023-01-11 21:34:44 +00:00
|
|
|
float3x3 _24 = transpose(float3x3(float3(_6.b[0]), float3(_6.b[1]), float3(_6.b[2])));
|
|
|
|
_6.b[0] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[0];
|
|
|
|
_6.b[1] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[1];
|
|
|
|
_6.b[2] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[2];
|
|
|
|
_6.a = _24 * float3(_6.a);
|
2019-07-23 14:25:19 +00:00
|
|
|
}
|
|
|
|
|