Skip to content

Commit

Permalink
Swap back to default framebuffer before doing final rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarthayhurst committed Jul 12, 2023
1 parent ed7c961 commit fdf9b13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ammonite/graphics/renderCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,16 +780,16 @@ namespace ammonite {
If post-processing isn't required or can be avoided, render directly to screen
*/
internal::prepareScreen(0, *widthPtr, *heightPtr, false);
if (isPostRequired) {
//Resolve multisampling into regular texture
if (sampleCount != 0) {
GLbitfield blitBits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT;
glBlitNamedFramebuffer(colourBufferMultisampleFBO, screenQuadFBO, 0, 0, renderWidth, renderHeight, 0, 0, renderWidth, renderHeight, blitBits, GL_NEAREST);
}

//Swap to default framebuffer and correct shaders
//Swap to correct shaders
glUseProgram(screenShader.shaderId);
internal::prepareScreen(0, *widthPtr, *heightPtr, false);

//Conditionally send data for blur
glUniform1i(screenShader.focalDepthEnabledId, *focalDepthEnabledPtr);
Expand Down

0 comments on commit fdf9b13

Please sign in to comment.