Fix bloom shaders

This commit is contained in:
Antoine Pilote
2023-09-27 19:31:05 -04:00
parent 798f00cb35
commit 46bb625106

View File

@@ -92,11 +92,11 @@ vec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {
vec4 color = vec4(0.0);
vec2 off1 = vec2(1.3846153846) * direction;
vec2 off2 = vec2(3.2307692308) * direction;
color += texture2D(image, uv) * 0.2270270270;
color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;
color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;
color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;
color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;
color += texture(image, uv) * 0.2270270270;
color += texture(image, uv + (off1 / resolution)) * 0.3162162162;
color += texture(image, uv - (off1 / resolution)) * 0.3162162162;
color += texture(image, uv + (off2 / resolution)) * 0.0702702703;
color += texture(image, uv - (off2 / resolution)) * 0.0702702703;
return color;
}