#version 460 core #extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_shading_language_420pack : enable // includes #include "render/shaders/common/render_compatibility_common.h" // sets // in / out layout(location = 0) out vec2 outUv; // // fullscreen triangle void main(void) { float x = -1.0 + float((gl_VertexIndex & 1) << 2); float y = 1.0 - float((gl_VertexIndex & 2) << 1); outUv.x = (x + 1.0) * 0.5; outUv.y = (y + 1.0) * 0.5; CORE_VERTEX_OUT(vec4(x, y, 0, 1)); }