updating blur shading, broken

This commit is contained in:
2026-07-11 16:41:50 -07:00
parent c1ae5b0f74
commit f7a5955dbf
10 changed files with 102 additions and 64 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 = texture(texture0, fragTexCoord);
}