23 lines
472 B
GLSL
23 lines
472 B
GLSL
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using namespace metal;
|
|
|
|
constant float a_tmp [[function_constant(1)]];
|
|
constant float a = is_function_constant_defined(a_tmp) ? a_tmp : 1.0;
|
|
constant float b_tmp [[function_constant(2)]];
|
|
constant float b = is_function_constant_defined(b_tmp) ? b_tmp : 2.0;
|
|
|
|
struct main0_out
|
|
{
|
|
float4 FragColor [[color(0)]];
|
|
};
|
|
|
|
fragment main0_out main0()
|
|
{
|
|
main0_out out = {};
|
|
out.FragColor = float4(a + b);
|
|
return out;
|
|
}
|
|
|