SPIRV-Cross/shaders-msl-no-opt/tese/load-clip-cull.msl2.tese
Hans-Kristian Arntzen 75ed73818c MSL: Handle loading Clip/CullDistance in TESE.
Need to allow the flattened space to go through in some edge cases where
we cannot reasonably unflatten.
2021-04-19 12:10:49 +02:00

20 lines
411 B
GLSL

#version 450
layout(quads) in;
in gl_PerVertex
{
float gl_ClipDistance[2];
float gl_CullDistance[3];
vec4 gl_Position;
} gl_in[];
void main()
{
gl_Position.x = gl_in[0].gl_ClipDistance[0];
gl_Position.y = gl_in[1].gl_CullDistance[0];
gl_Position.z = gl_in[0].gl_ClipDistance[1];
gl_Position.w = gl_in[1].gl_CullDistance[1];
gl_Position += gl_in[0].gl_Position;
gl_Position += gl_in[1].gl_Position;
}