Hi, guys.
I try to implement SSAO technique.
But have a strange result.
The final frame looks as SSAO rendering step are using previous frame data.
But when I draw buffer data it looks good (can see it in the corner).
sequence of calls:
sceneRawBuffer.bind(); // the FBO that contains position, normal and color textures
glViewport(0, 0, width, height);
clear();
renderScene(viewMatrix, projectionMatrix); // render scene here
sceneRawBuffer.unbind(); // unbind FBO with textures
ssaoRenderer.render(projectionMatrix); // render texture with SSAO effect
lightScatteringRenderer.render(aspectRatio, projViewMatrix, toLightDirection); // render 'god rays'. doesn't matter in the case.
glViewport(0, 0, width, height);
renderFinalFrame(); // render final frame: mix up color, 'god rays' and SSAO data together.
textureCompositeRenderer.render(); // just render SSAO buffer data on the top.
Thank for any help!
Have a good day.