SPIRV-Cross/shaders-msl/tesc/reload-tess-level.multi-patch.tesc
Chip Davis 3e6010d8c5 MSL: Don't use a bitcast for tessellation levels in tesc shaders.
`half` cannot be bitcasted to `float`, because the two types are not the
same size. Use an expanding cast instead.

We were already doing this for stores to the tessellation levels; why I
didn't also do this for loads is beyond me.
2020-10-14 18:35:59 -05:00

18 lines
444 B
GLSL

#version 450
layout(vertices = 4) out;
void main()
{
if (gl_InvocationID == 0)
{
gl_TessLevelOuter[0] = 2.0;
gl_TessLevelOuter[1] = 3.0;
gl_TessLevelOuter[2] = 4.0;
gl_TessLevelOuter[3] = 5.0;
gl_TessLevelInner[0] = mix(gl_TessLevelOuter[0], gl_TessLevelOuter[3], 0.5);
gl_TessLevelInner[1] = mix(gl_TessLevelOuter[2], gl_TessLevelOuter[1], 0.5);
}
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
}