SPIRV-Cross/shaders-msl/vert/clip-distance-block.vert
Hans-Kristian Arntzen a3fe9756d2 MSL: Support ClipDistance as an input stage variable.
MSL does not support this, so we have to emulate it by passing it around
as a varying between stages. We use a special "user(clipN)" attribute
for this rather than locN which is used for user varyings.
2019-12-02 13:19:42 +01:00

16 lines
240 B
GLSL

#version 450
layout(location = 0) in vec4 Position;
out gl_PerVertex
{
vec4 gl_Position;
float gl_ClipDistance[2];
};
void main()
{
gl_Position = Position;
gl_ClipDistance[0] = Position.x;
gl_ClipDistance[1] = Position.y;
}