Add a framebuffer to hold a texture

This commit is contained in:
Dimitri Lozeve 2021-02-24 21:48:54 +01:00
parent 57cdfca13d
commit 60d94b06f2
4 changed files with 130 additions and 33 deletions

View file

@ -0,0 +1,15 @@
#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform float u_time;
uniform uint u_frame;
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform sampler2D u_texture;
void main() {
//FragColor = texture(u_texture, TexCoords);
FragColor = vec4(1.0 - texelFetch(u_texture, ivec2(gl_FragCoord), 0));
}