SHADE_Y3/Assets/Shaders/ToSwapchain_VS.glsl

21 lines
386 B
GLSL

#version 450
#extension GL_KHR_vulkan_glsl : enable
layout(location = 0) out struct
{
vec2 uv; // location = 0
} Out;
vec2 CreateQuad(in uint vertexID)
{
uint b = 1 << vertexID;
return vec2 ((0x3 & b) != 0, (0x9 & b) != 0);
}
void main()
{
vec2 texCoord = CreateQuad (gl_VertexIndex);
vec2 vertexPos = texCoord - vec2(0.5f);
gl_Position = vec4 (vertexPos, 0.0f, 1.0f);
}