wip framebuffers

This commit is contained in:
2025-09-14 15:47:01 +02:00
parent 3320e83efb
commit 85e061398e
4 changed files with 19 additions and 4 deletions
+11 -1
View File
@@ -4,7 +4,7 @@
#define CONSTANTS_H
static char *vertex_shader_text =
"#version 330\n"
"#version 460\n"
"uniform mat4 mvp;\n"
"in vec2 vPos;\n"
"out vec2 vUV;\n"
@@ -14,6 +14,16 @@ static char *vertex_shader_text =
" vUV = vPos;\n"
"}\n";
static char *output_fragment_shader_text =
"#version 460\n"
"in vec2 vUV;\n"
"out vec4 fragColor;\n"
"uniform sampler2D frame0\n"
"void main()\n"
"{\n"
" fragColor = vec4(texture(frame0, vUV).xyz, 1.0);\n"
"}\n";
static const Vertex vertices[6] = {{{0.0f, 0.0f}}, {{0.0f, 1.0f}},
{{1.0f, 1.0f}}, {{0.0f, 0.0f}},
{{1.0f, 1.0f}}, {{1.0f, 0.0f}}};