mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-13 23:50:08 +00:00
41d9424233
This is intended to be used to support `VK_KHR_maintenance2`'s tessellation domain origin feature. If `tess_domain_origin_lower_left` is `true`, the `v` coordinate will be inverted with respect to the domain. Additionally, in `Triangles` mode, the `v` and `w` coordinates will be swapped. This is because the winding order is interpreted differently in lower-left mode.
13 lines
463 B
GLSL
13 lines
463 B
GLSL
#version 310 es
|
|
#extension GL_EXT_tessellation_shader : require
|
|
|
|
layout(cw, quads, fractional_even_spacing) in;
|
|
|
|
void main()
|
|
{
|
|
gl_Position = vec4(gl_TessCoord.x * gl_TessLevelInner[0] * gl_TessLevelOuter[0] + (1.0 - gl_TessCoord.x) * gl_TessLevelInner[0] * gl_TessLevelOuter[2],
|
|
gl_TessCoord.y * gl_TessLevelInner[1] * gl_TessLevelOuter[3] + (1.0 - gl_TessCoord.y) * gl_TessLevelInner[1] * gl_TessLevelOuter[1],
|
|
0, 1);
|
|
}
|
|
|