Skip to content

Commit ce5d932

Browse files
committed
* warp: fixed the fbo flipping bit in the gl renderer
1 parent 19880fc commit ce5d932

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

warp/src/gl_renderer.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -594,10 +594,14 @@ void gl_renderer::render_kernels(const float& delta, const float& render_delta,
594594
}
595595
else {
596596
err = libwarp_gather(&cam_setup, relative_delta,
597-
scene_fbo.color[1u - warp_state.cur_fbo], scene_fbo.depth[1u - warp_state.cur_fbo],
598-
scene_fbo.color[warp_state.cur_fbo], scene_fbo.depth[warp_state.cur_fbo],
599-
scene_fbo.motion[warp_state.cur_fbo * 2], scene_fbo.motion[(1u - warp_state.cur_fbo) * 2 + 1],
600-
scene_fbo.motion_depth[warp_state.cur_fbo], scene_fbo.motion_depth[1u - warp_state.cur_fbo],
597+
scene_fbo.color[1u - warp_state.cur_fbo],
598+
scene_fbo.depth[1u - warp_state.cur_fbo],
599+
scene_fbo.color[warp_state.cur_fbo],
600+
scene_fbo.depth[warp_state.cur_fbo],
601+
scene_fbo.motion[warp_state.cur_fbo * 2],
602+
scene_fbo.motion[(1u - warp_state.cur_fbo) * 2 + 1],
603+
scene_fbo.motion_depth[warp_state.cur_fbo],
604+
scene_fbo.motion_depth[1u - warp_state.cur_fbo],
601605
scene_fbo.compute_color);
602606
}
603607
}
@@ -919,7 +923,7 @@ void gl_renderer::render_full_scene(const gl_obj_model& model, const camera& cam
919923
glDrawBuffers(1, &draw_buffers[0]); // reset to 1 draw buffer
920924

921925
// end
922-
if(warp_state.is_bidir_scatter || !warp_state.is_scatter) {
926+
if(!warp_state.is_scatter && !warp_state.is_gather_forward) {
923927
// flip state
924928
warp_state.cur_fbo = 1 - warp_state.cur_fbo;
925929
}

0 commit comments

Comments
 (0)