| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
constant float a_tmp [[function_constant(1)]]; |
| 7 |
constant float a = is_function_constant_defined(a_tmp) ? a_tmp : 1.0; |
| 8 |
constant float b_tmp [[function_constant(2)]]; |
| 9 |
constant float b = is_function_constant_defined(b_tmp) ? b_tmp : 2.0; |
| 10 |
|
| 11 |
struct main0_out |
| 12 |
{ |
| 13 |
float4 FragColor [[color(0)]]; |
| 14 |
}; |
| 15 |
|
| 16 |
fragment main0_out main0() |
| 17 |
{ |
| 18 |
main0_out out = {}; |
| 19 |
out.FragColor = float4(a + b); |
| 20 |
return out; |
| 21 |
} |
| 22 |
|