rpcsx/rpcsx-gpu/shaders/rect_list.geom.glsl
2024-10-01 22:04:40 +03:00

40 lines
631 B
GLSL

#version 450
layout (triangles, invocations = 1) in;
layout (triangle_strip, max_vertices = 4) out;
void main(void)
{
vec4 topLeft = gl_in[0].gl_Position;
vec4 right = gl_in[1].gl_Position;
vec4 bottomLeft = gl_in[2].gl_Position;
vec4 topRight = vec4(
right.x,
topLeft.y,
topLeft.z,
topLeft.w
);
vec4 bottomRight = vec4(
right.x,
bottomLeft.y,
topLeft.z,
topLeft.w
);
gl_Position = topLeft;
EmitVertex();
gl_Position = bottomLeft;
EmitVertex();
gl_Position = topRight;
EmitVertex();
gl_Position = bottomRight;
EmitVertex();
EndPrimitive();
}