mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
17 lines
481 B
GLSL
17 lines
481 B
GLSL
#version 450
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
|
|
// rendering a fullscreen quad (which is actually just a huge triangle)
|
|
// source: https://www.saschawillems.de/blog/2016/08/13/vulkan-tutorial-on-rendering-a-fullscreen-quad-without-buffers/
|
|
|
|
out gl_PerVertex {
|
|
vec4 gl_Position;
|
|
};
|
|
|
|
layout(location = 0) out vec2 texCoord;
|
|
|
|
void main()
|
|
{
|
|
texCoord = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
|
gl_Position = vec4(texCoord * 2.0f + -1.0f, 0.0f, 1.0f);
|
|
}
|