Hi,
this is my new 2D filter. It is like a regular bloom effect, but instead of blurring everything it only blurs within a certain threshold, which allows you to limit the objects that are blurred. The effect is perfect for lights and signs
#version 120
uniform sampler2D bgl_RenderedTexture;
uniform float threshold;
#define SAMPLES 5
void main() {
vec4 original = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
vec4 col = vec4(0.0);
for (int i = -SAMPLES; i < SAMPLES; i++) {
for (int j = -SAMPLES; j < SAMPLES; j++) {
vec4 s = texture2D(bgl_RenderedTexture, gl_TexCoord[0].xy + vec2(i, j) * 0.004);
if (s.r >= threshold || s.g >= threshold || s.b >= threshold) {
col += s * 0.25;
}
}
}
gl_FragColor = (col*0.04) + original;
}
Donāt forget to add a float property called āthresholdā
Woow! Looks very nice on the screenshot! Could you share your testing .blend with?
You think you could add a color filter to blur/bloom only selected colors? Very cool. Thanks for sharing
We always see the same reflection textures on the teapots
Nice filter but I agree with @Thatimster that if there is a way to smooth the samples it would look even better but from a distance it is definitely perfect. [URL="/u/Thatimster