So I am trying to come up with a way to do a motion blur effect without using the velocity vector method, this is not because I cannot do it with that, but a section of work I am working on where the requirement is to store each frame in an FBO then motion blur them.
Right now I pass my 4 FBO's into my shader. Then I run this fragment shader with them and output the result, I cannot seem to get this to produce any effect other than darkening or lighting the engine depending on changes to the code below. I have also tried mixing the frames together and applying weights. I think is is an issue on how many FBO frames I am holding.
#version 330
in vec2 uv0;
uniform sampler2D Blur1;
uniform sampler2D Blur2;
uniform sampler2D Blur3;
uniform sampler2D Blur4;
out vec4 colour;
void main()
{
vec3 colorA = texture2D(Blur1,uv0).rgb;
vec3 colorB = texture2D(Blur2,uv0).rgb;
vec3 colorC = texture2D(Blur3,uv0).rgb;
vec3 colorD = texture2D(Blur4,uv0).rgb;
colour.rgb = colorA + colorB + colorC + colorD;
colour.rgb /= 4;
}
How can I get a passable motion blur with 4 frames? I can also go up to 8 FBO frames.