SPIRV-Cross/reference/shaders-msl/frag/spec-constant-ternary.frag
2019-09-24 14:35:25 -04:00

23 lines
413 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
constant uint s_tmp [[function_constant(0)]];
constant uint s = is_function_constant_defined(s_tmp) ? s_tmp : 10u;
constant bool _13 = (s > 20u);
constant uint f = _13 ? 30u : 50u;
struct main0_out
{
float FragColor [[color(0)]];
};
fragment main0_out main0()
{
main0_out out = {};
out.FragColor = float(f);
return out;
}