2022-11-19 21:44:41 +08:00
|
|
|
#version 450
|
|
|
|
#extension GL_KHR_vulkan_glsl : enable
|
|
|
|
|
|
|
|
|
|
|
|
vec2 CreateQuad(in uint vertexID)
|
|
|
|
{
|
|
|
|
uint b = 1 << vertexID;
|
|
|
|
return vec2 ((0x3 & b) != 0, (0x9 & b) != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2022-11-22 10:09:52 +08:00
|
|
|
vec2 vertexPos = 2 * (CreateQuad(gl_VertexIndex) - vec2(0.5f));
|
2022-11-19 21:44:41 +08:00
|
|
|
gl_Position = vec4 (vertexPos, 0.0f, 1.0f);
|
|
|
|
}
|