SHADE_Y3/Assets/Shaders/ToSwapchain_VS.glsl

15 lines
294 B
GLSL

#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()
{
vec2 vertexPos = 2 * (CreateQuad(gl_VertexIndex) - vec2(0.5f));
gl_Position = vec4 (vertexPos, 0.0f, 1.0f);
}