Refactor shaders
This commit is contained in:
12
data/shaders/post_processing.vert
Normal file
12
data/shaders/post_processing.vert
Normal file
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
|
||||
out vec2 v_tex_coords;
|
||||
|
||||
void main()
|
||||
{
|
||||
float x = -1.0 + float((gl_VertexID & 1) << 2);
|
||||
float y = -1.0 + float((gl_VertexID & 2) << 1);
|
||||
v_tex_coords.x = (x + 1.0) * 0.5;
|
||||
v_tex_coords.y = (y + 1.0) * 0.5;
|
||||
gl_Position = vec4(x, y, 0, 1);
|
||||
}
|
||||
Reference in New Issue
Block a user