blob: e5cbb885982bbaccd1857b05d4c5d6d7ac1f77d9 [file] [log] [blame]
Ben Claytond1232672021-05-18 09:24:18 +00001#include <metal_stdlib>
2
3using namespace metal;
4struct Uniforms {
5 /* 0x0000 */ float4x4 modelViewProjectionMatrix;
6};
Ben Clayton8ec32a62022-02-09 23:55:51 +00007
Ben Claytond1232672021-05-18 09:24:18 +00008struct VertexInput {
9 float4 cur_position;
10 float4 color;
11};
Ben Clayton8ec32a62022-02-09 23:55:51 +000012
Ben Claytond1232672021-05-18 09:24:18 +000013struct VertexOutput {
14 float4 vtxFragColor;
15 float4 Position;
16};
Ben Clayton8ec32a62022-02-09 23:55:51 +000017
Ben Claytond1232672021-05-18 09:24:18 +000018struct tint_symbol_1 {
19 float4 cur_position [[attribute(0)]];
20 float4 color [[attribute(1)]];
21};
Ben Clayton8ec32a62022-02-09 23:55:51 +000022
Ben Claytond1232672021-05-18 09:24:18 +000023struct tint_symbol_2 {
24 float4 vtxFragColor [[user(locn0)]];
25 float4 Position [[position]];
26};
Ben Claytond1232672021-05-18 09:24:18 +000027
James Pricee548db92021-10-28 15:00:39 +000028VertexOutput vtx_main_inner(VertexInput input, const constant Uniforms* const tint_symbol_7) {
Ben Claytond1232672021-05-18 09:24:18 +000029 VertexOutput output = {};
James Pricee548db92021-10-28 15:00:39 +000030 output.Position = ((*(tint_symbol_7)).modelViewProjectionMatrix * input.cur_position);
Ben Claytond1232672021-05-18 09:24:18 +000031 output.vtxFragColor = input.color;
James Pricea5d73ce2021-08-04 22:15:28 +000032 return output;
33}
34
James Pricee548db92021-10-28 15:00:39 +000035vertex tint_symbol_2 vtx_main(const constant Uniforms* tint_symbol_8 [[buffer(0)]], tint_symbol_1 tint_symbol [[stage_in]]) {
James Pricea5d73ce2021-08-04 22:15:28 +000036 VertexInput const tint_symbol_6 = {.cur_position=tint_symbol.cur_position, .color=tint_symbol.color};
James Pricee548db92021-10-28 15:00:39 +000037 VertexOutput const inner_result = vtx_main_inner(tint_symbol_6, tint_symbol_8);
James Pricea5d73ce2021-08-04 22:15:28 +000038 tint_symbol_2 wrapper_result = {};
39 wrapper_result.vtxFragColor = inner_result.vtxFragColor;
40 wrapper_result.Position = inner_result.Position;
41 return wrapper_result;
42}
43
Ben Clayton8ec32a62022-02-09 23:55:51 +000044struct tint_symbol_4 {
45 float4 fragColor [[user(locn0)]];
46};
47
48struct tint_symbol_5 {
49 float4 value [[color(0)]];
50};
51
James Pricea5d73ce2021-08-04 22:15:28 +000052float4 frag_main_inner(float4 fragColor) {
53 return fragColor;
Ben Claytond1232672021-05-18 09:24:18 +000054}
55
56fragment tint_symbol_5 frag_main(tint_symbol_4 tint_symbol_3 [[stage_in]]) {
James Pricea5d73ce2021-08-04 22:15:28 +000057 float4 const inner_result_1 = frag_main_inner(tint_symbol_3.fragColor);
58 tint_symbol_5 wrapper_result_1 = {};
59 wrapper_result_1.value = inner_result_1;
60 return wrapper_result_1;
Ben Claytond1232672021-05-18 09:24:18 +000061}
62