1#version 460 core 2#extension GL_ARB_separate_shader_objects : enable 3#extension GL_ARB_shading_language_420pack : enable 4 5// includes 6#include "render/shaders/common/render_compatibility_common.h" 7 8// sets 9 10// in / out 11 12layout(location = 0) out vec2 outUv; 13 14// 15// fullscreen triangle 16void main(void) 17{ 18 float x = -1.0 + float((gl_VertexIndex & 1) << 2); 19 float y = 1.0 - float((gl_VertexIndex & 2) << 1); 20 outUv.x = (x + 1.0) * 0.5; 21 outUv.y = (y + 1.0) * 0.5; 22 CORE_VERTEX_OUT(vec4(x, y, 0, 1)); 23} 24