#include #include struct PushConstants { metal::uint index; }; struct main1Input { metal::float2 tex_coord [[user(loc0), center_perspective]]; }; struct main1Output { metal::float4 member [[color(1)]]; }; fragment main1Output main1( main1Input varyings [[stage_in]] , metal::texture2d texture0_ [[user(fake0)]] , metal::texture2d texture1_ [[user(fake0)]] , metal::sampler sampler [[user(fake0)]] , constant PushConstants& pc [[user(fake0)]] ) { const auto tex_coord = varyings.tex_coord; if (pc.index == 0u) { metal::float4 _e9 = texture0_.sample(sampler, tex_coord); return main1Output { _e9 }; } else { metal::float4 _e10 = texture1_.sample(sampler, tex_coord); return main1Output { _e10 }; } }