working framebuffers, textures and feedback

This commit is contained in:
2025-09-15 00:10:00 +02:00
parent 85e061398e
commit ede531de57
6 changed files with 116 additions and 105 deletions
+4 -3
View File
@@ -5,7 +5,8 @@
static char *vertex_shader_text =
"#version 460\n"
"uniform mat4 mvp;\n"
"const mat4 mvp = "
"{{2.,0.,0.,0.},{0.,2.,0.,0.},{0.,0.,2.,0.},{-1.,-1.,1.,1.}};\n"
"in vec2 vPos;\n"
"out vec2 vUV;\n"
"void main()\n"
@@ -18,10 +19,10 @@ static char *output_fragment_shader_text =
"#version 460\n"
"in vec2 vUV;\n"
"out vec4 fragColor;\n"
"uniform sampler2D frame0\n"
"uniform sampler2D frame0;\n"
"void main()\n"
"{\n"
" fragColor = vec4(texture(frame0, vUV).xyz, 1.0);\n"
" fragColor = texture(frame0, vUV);\n"
"}\n";
static const Vertex vertices[6] = {{{0.0f, 0.0f}}, {{0.0f, 1.0f}},