e75add42c9
These are mapped to Metal's post-tessellation vertex functions. The semantic difference is much less here, so this change should be simpler than the previous one. There are still some hairy parts, though. In MSL, the array of control point data is represented by a special type, `patch_control_point<T>`, where `T` is a valid stage-input type. This object must be embedded inside the patch-level stage input. For this reason, I've added a new type to the type system to represent this. On Mac, the number of input control points to the function must be specified in the `patch()` attribute. This is optional on iOS. SPIRV-Cross takes this from the `OutputVertices` execution mode; the intent is that if it's not set in the shader itself, MoltenVK will set it from the tessellation control shader. If you're translating these offline, you'll have to update the control point count manually, since this number must match the number that is passed to the `drawPatches:...` family of methods. Fixes #120.
16 lines
291 B
GLSL
16 lines
291 B
GLSL
#version 450
|
|
|
|
layout(ccw, quads, fractional_odd_spacing) in;
|
|
layout(location = 0) in vec4 Floats[];
|
|
layout(location = 2) in vec4 Floats2[gl_MaxPatchVertices];
|
|
|
|
void set_position()
|
|
{
|
|
gl_Position = Floats[0] * gl_TessCoord.x + Floats2[1] * gl_TessCoord.y;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
set_position();
|
|
}
|