2021-08-12 19:47:20 +00:00
|
|
|
#include <metal_stdlib>
|
2021-06-10 18:49:14 +00:00
|
|
|
|
2021-08-12 19:47:20 +00:00
|
|
|
using namespace metal;
|
|
|
|
struct vertexUniformBuffer1 {
|
|
|
|
/* 0x0000 */ float2x2 transform1;
|
|
|
|
};
|
|
|
|
struct vertexUniformBuffer2 {
|
|
|
|
/* 0x0000 */ float2x2 transform2;
|
|
|
|
};
|
|
|
|
struct tint_symbol_1 {
|
|
|
|
float4 value [[position]];
|
|
|
|
};
|
|
|
|
struct tint_array_wrapper {
|
|
|
|
float2 arr[3];
|
|
|
|
};
|
2021-06-10 18:49:14 +00:00
|
|
|
|
2021-08-12 19:47:20 +00:00
|
|
|
float4 tint_symbol_inner(constant vertexUniformBuffer1& x_20, constant vertexUniformBuffer2& x_26, uint gl_VertexIndex) {
|
|
|
|
tint_array_wrapper indexable = {};
|
|
|
|
float2x2 const x_23 = x_20.transform1;
|
|
|
|
float2x2 const x_28 = x_26.transform2;
|
|
|
|
uint const x_46 = gl_VertexIndex;
|
|
|
|
tint_array_wrapper const tint_symbol_2 = {.arr={float2(-1.0f, 1.0f), float2(1.0f, 1.0f), float2(-1.0f, -1.0f)}};
|
|
|
|
indexable = tint_symbol_2;
|
|
|
|
float2 const x_51 = indexable.arr[x_46];
|
|
|
|
float2 const x_52 = (float2x2((x_23[0u] + x_28[0u]), (x_23[1u] + x_28[1u])) * x_51);
|
2021-10-20 16:12:33 +00:00
|
|
|
return float4(x_52[0], x_52[1], 0.0f, 1.0f);
|
2021-08-12 19:47:20 +00:00
|
|
|
}
|
2021-06-10 18:49:14 +00:00
|
|
|
|
2021-08-12 19:47:20 +00:00
|
|
|
vertex tint_symbol_1 tint_symbol(uint gl_VertexIndex [[vertex_id]], constant vertexUniformBuffer1& x_20 [[buffer(0)]], constant vertexUniformBuffer2& x_26 [[buffer(1)]]) {
|
|
|
|
float4 const inner_result = tint_symbol_inner(x_20, x_26, gl_VertexIndex);
|
|
|
|
tint_symbol_1 wrapper_result = {};
|
|
|
|
wrapper_result.value = inner_result;
|
|
|
|
return wrapper_result;
|
|
|
|
}
|
2021-06-10 18:49:14 +00:00
|
|
|
|