#include #include struct VertexOutput { metal::float4 position; float varying; }; struct FragmentOutput { float depth; metal::uint sample_mask; float color; }; struct vertex1Input { metal::uint color [[attribute(10)]]; }; struct vertex1Output { metal::float4 position [[position]]; float varying [[user(loc1), center_perspective]]; }; vertex vertex1Output vertex1( vertex1Input varyings [[stage_in]] , metal::uint vertex_index [[vertex_id]] , metal::uint instance_index [[instance_id]] ) { const auto color = varyings.color; metal::uint tmp = (vertex_index + instance_index) + color; const auto _tmp = VertexOutput {metal::float4(1.0), static_cast(tmp)}; return vertex1Output { _tmp.position, _tmp.varying }; } struct fragment1Input { float varying [[user(loc1), center_perspective]]; }; struct fragment1Output { float depth [[depth(any)]]; metal::uint sample_mask [[sample_mask]]; float color [[color(0)]]; }; fragment fragment1Output fragment1( fragment1Input varyings1 [[stage_in]] , metal::float4 position [[position]] , bool front_facing [[front_facing]] , metal::uint sample_index [[sample_id]] , metal::uint sample_mask [[sample_mask]] ) { const VertexOutput in = { position, varyings1.varying }; metal::uint mask = sample_mask & (1u << sample_index); float color1 = front_facing ? 0.0 : 1.0; const auto _tmp = FragmentOutput {in.varying, mask, color1}; return fragment1Output { _tmp.depth, _tmp.sample_mask, _tmp.color }; } struct compute1Input { }; kernel void compute1( metal::uint3 global_id [[thread_position_in_grid]] , metal::uint3 local_id [[thread_position_in_threadgroup]] , metal::uint local_index [[thread_index_in_threadgroup]] , metal::uint3 wg_id [[threadgroup_position_in_grid]] ) { return; }