removed vertex and index buffers, we are only rendering fullscreen

This commit is contained in:
Piotrek
2021-04-26 16:55:57 +02:00
parent ea1c0ba089
commit 19aefbf287
7 changed files with 31 additions and 93 deletions
Binary file not shown.
+12 -4
View File
@@ -1,11 +1,19 @@
#version 450
layout(location=0) in vec3 in_position;
layout(location=1) in vec2 in_uv;
layout(location=0) out vec2 vert_uv;
const vec2 positions[6] = vec2[6](
vec2(-1.0, 1.0),
vec2( 1.0, 1.0),
vec2( 1.0,-1.0),
vec2(-1.0, 1.0),
vec2( 1.0,-1.0),
vec2(-1.0,-1.0)
);
void main()
{
vert_uv = in_uv;
gl_Position = vec4(in_position, 1.0);
vert_uv = positions[gl_VertexIndex];
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
}