2021-05-20 11:55:28 +00:00
|
|
|
#include <metal_stdlib>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
struct Output {
|
|
|
|
float4 Position;
|
|
|
|
float4 color;
|
|
|
|
};
|
2022-02-09 23:55:51 +00:00
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
struct tint_symbol_1 {
|
2021-05-20 11:55:28 +00:00
|
|
|
float4 color [[user(locn0)]];
|
|
|
|
float4 Position [[position]];
|
|
|
|
};
|
2022-02-09 23:55:51 +00:00
|
|
|
|
2021-06-16 09:19:36 +00:00
|
|
|
struct tint_array_wrapper {
|
|
|
|
float2 arr[4];
|
2021-06-04 14:40:28 +00:00
|
|
|
};
|
2022-02-09 23:55:51 +00:00
|
|
|
|
2021-06-04 14:40:28 +00:00
|
|
|
struct tint_array_wrapper_1 {
|
2021-06-16 09:19:36 +00:00
|
|
|
float4 arr[4];
|
2021-06-04 14:40:28 +00:00
|
|
|
};
|
2021-05-20 11:55:28 +00:00
|
|
|
|
2021-08-04 22:15:28 +00:00
|
|
|
Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) {
|
2022-01-06 18:11:01 +00:00
|
|
|
tint_array_wrapper const zv = {.arr={float2(0.200000003f, 0.200000003f), float2(0.300000012f, 0.300000012f), float2(-0.100000001f, -0.100000001f), float2(1.100000024f, 1.100000024f)}};
|
2021-10-20 16:12:33 +00:00
|
|
|
float const z = zv.arr[InstanceIndex][0];
|
2021-05-20 11:55:28 +00:00
|
|
|
Output output = {};
|
|
|
|
output.Position = float4(0.5f, 0.5f, z, 1.0f);
|
2022-01-06 18:11:01 +00:00
|
|
|
tint_array_wrapper_1 const colors = {.arr={float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}};
|
2021-06-16 09:19:36 +00:00
|
|
|
output.color = colors.arr[InstanceIndex];
|
2021-08-04 22:15:28 +00:00
|
|
|
return output;
|
|
|
|
}
|
|
|
|
|
|
|
|
vertex tint_symbol_1 tint_symbol(uint VertexIndex [[vertex_id]], uint InstanceIndex [[instance_id]]) {
|
|
|
|
Output const inner_result = tint_symbol_inner(VertexIndex, InstanceIndex);
|
|
|
|
tint_symbol_1 wrapper_result = {};
|
|
|
|
wrapper_result.Position = inner_result.Position;
|
|
|
|
wrapper_result.color = inner_result.color;
|
|
|
|
return wrapper_result;
|
2021-05-20 11:55:28 +00:00
|
|
|
}
|
|
|
|
|