SPIRV-Cross/reference/shaders-msl/vert/clip-distance-block.no-user-varying.vert
Hans-Kristian Arntzen ebf463674d MSL: Allow removing clip distance user varyings.
Only safe if user knows that subsequent shader stage will not read clip
distance.
2020-04-20 09:58:40 +02:00

26 lines
458 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
float4 gl_Position [[position]];
float gl_ClipDistance [[clip_distance]] [2];
};
struct main0_in
{
float4 Position [[attribute(0)]];
};
vertex main0_out main0(main0_in in [[stage_in]])
{
main0_out out = {};
out.gl_Position = in.Position;
out.gl_ClipDistance[0] = in.Position.x;
out.gl_ClipDistance[1] = in.Position.y;
return out;
}