Add a framebuffer to hold a texture
This commit is contained in:
parent
57cdfca13d
commit
60d94b06f2
4 changed files with 130 additions and 33 deletions
15
shaders/invert_screen.frag
Normal file
15
shaders/invert_screen.frag
Normal 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));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue