Hi all! I’ve got a problem. I’m trying to make motion blur using accumulation buffer. There is no example by this theme in the “Redbook”. So, i have the code like this:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glAccum(GL_RETURN,1.0); //Drawing last frame, saved in buffer
//Drawing the scene
//...
glAccum(GL_LOAD,1.0); //saving current frame in the buffer
glAccum(GL_MULT, <SomeNumber> ); //make current frame in buffer dim
SwapBuffers(MainDC);
So, as I understand, starting width second frame the motion blur should be rendered. But there is no motion blur. I think when I swap buffers the accumulation buffer is clear, but why?
//make scene a bit dimmer by 1-<SomeNumber>
same <SomeNumber> as below
glAccum(GL_ACCUM,1.0); //adding the current frame to the buffer
glAccum(GL_RETURN,1.0); //Drawing last frame, saved in buffer
glAccum(GL_MULT, <SomeNumber> ); //make current frame in buffer dim
Nothing is happening! So 2 questions:
1)Is specified blend function using when accumulating to the buffer, or it’s standart function that always the same?
2)Is the depth buffer changing when returning image from accum buffer?