Debian Codegraph @

third_party/spirv-cross/reference/shaders-msl/frag/write-depth-in-function.frag

raw
1 #pragma clang diagnostic ignored "-Wmissing-prototypes"
2
3 #include <metal_stdlib>
4 #include <simd/simd.h>
5
6 using namespace metal;
7
8 struct main0_out
9 {
10 float FragColor [[color(0)]];
11 float gl_FragDepth [[depth(any)]];
12 };
13
14 static inline __attribute__((always_inline))
15 void set_output_depth(thread float& gl_FragDepth)
16 {
17 gl_FragDepth = 0.20000000298023223876953125;
18 }
19
20 fragment main0_out main0()
21 {
22 main0_out out = {};
23 out.FragColor = 1.0;
24 set_output_depth(out.gl_FragDepth);
25 return out;
26 }
27