init commit

This commit is contained in:
Alex Lardner
2026-07-04 19:08:19 -07:00
parent 40dc51d21a
commit d7890c9808
106 changed files with 13653 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#version 330
in vec2 fragTexCoord;
in vec4 fragColor;
uniform sampler2D texture0;
uniform vec4 colDiffuse;
uniform vec2 resolution;
uniform vec2 direction; // (1,0) for horizontal pass, (0,1) for vertical pass
out vec4 finalColor;
void main()
{
vec2 texel = direction / resolution;
// 9-tap Gaussian, weights from Pascal's-triangle-style approximation
const float weight[5] = float[](
0.227027, 0.1945946, 0.1216216, 0.054054, 0.016216
);
vec4 color = texture(texture0, fragTexCoord) * weight[0];
for (int i = 1; i < 4; i++) {
vec2 offset = texel * float(i);
color += texture(texture0, fragTexCoord + offset) * weight[i];
color += texture(texture0, fragTexCoord - offset) * weight[i];
}
finalColor = color * colDiffuse * fragColor * 1.8;
}