added shader

This commit is contained in:
2025-01-05 22:48:09 +01:00
parent 126ef4ace8
commit edf4d9fd60
17 changed files with 257 additions and 153 deletions

View File

@@ -1,19 +0,0 @@
#version 330 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D currentFrameTex;
uniform sampler2D lastFrameTex;
uniform int frameCount;
#define MAX_FRAMES 500.0f
void main()
{
vec3 col = texture(currentFrameTex, TexCoords).rgb;
vec3 col2 = texture(lastFrameTex, TexCoords).rgb;
col = mix(col, col2, min(frameCount/MAX_FRAMES,1.0f));
FragColor = vec4(col, 1.0);
}

View File

@@ -1,11 +0,0 @@
#version 330 core
layout(location = 0) in vec2 aPos;
layout(location = 1) in vec2 aTexCoords;
out vec2 TexCoords;
void main()
{
TexCoords = aTexCoords;
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
}