// Implementation of Subpixel Morphological Antialiasing (SMAA) is based on https://github.com/iryoku/smaa layout (location = 0) in vec2 a_pos; layout (location = 1) in vec2 a_tcoord; layout (location = 0) out vec2 v_colorTexCoords; layout (location = 1) out vec4 v_offset; layout (binding = 0) uniform UBO { vec4 u_framebufferMetrics; }; void main() { v_colorTexCoords = a_tcoord; v_offset = u_framebufferMetrics.xyxy * vec4(1.0, 0.0, 0.0, 1.0) + a_tcoord.xyxy; gl_Position = vec4(a_pos, 0.0, 1.0); }