third_party/spirv-cross/reference/shaders-msl/frag/binary-func-unpack-pack-arguments.frag
raw| 1 | #include <metal_stdlib> |
| 2 | #include <simd/simd.h> |
| 3 | |
| 4 | using namespace metal; |
| 5 | |
| 6 | struct UBO |
| 7 | { |
| 8 | packed_float3 color; |
| 9 | float v; |
| 10 | }; |
| 11 | |
| 12 | struct main0_out |
| 13 | { |
| 14 | float FragColor [[color(0)]]; |
| 15 | }; |
| 16 | |
| 17 | struct main0_in |
| 18 | { |
| 19 | float3 vIn [[user(locn0)]]; |
| 20 | }; |
| 21 | |
| 22 | fragment main0_out main0(main0_in in [[stage_in]], constant UBO& _15 [[buffer(0)]]) |
| 23 | { |
| 24 | main0_out out = {}; |
| 25 | out.FragColor = dot(in.vIn, float3(_15.color)); |
| 26 | return out; |
| 27 | } |
| 28 |