
(zero gravity physics world with a glowing circle moving around a leaving a motion blur effect, how cool is that

Built this:
Code: Select all
[[
extern number intensity;
extern number aspeed;
vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ) {
vec2 speed = vec2(aspeed, 0.0);
vec2 offset = intensity * speed;
vec4 c = vec4(0.);
number inc = 0.1;
number weight = 0.;
for (number i = 0.; i <= .3; i += inc)
{
c += Texel(texture, texture_coords + i * offset).rgba;
weight += 1.;
}
c /= weight;
return c;
}
]]
Out of the source from this link, it's not really what I wanted but it'll do for now the thing is it's only made for horizontal movement, can someone make this work for vertiacal and diagonal movement ? I still don't undestand a single thing of GLSL
