Move NodeCanvas display resolve behind seam
This commit is contained in:
@@ -762,22 +762,37 @@ void NodeCanvas::draw()
|
||||
|
||||
if (m_density != 1.f)
|
||||
{
|
||||
m_rtt.unbindFramebuffer();
|
||||
|
||||
clear_node_canvas_color_buffer({ 1.f, 1.f, 1.f, 0.f });
|
||||
apply_node_canvas_viewport(c.x + App::I->off_x, c.y + App::I->off_y, c.z, c.w);
|
||||
|
||||
// draw the canvas
|
||||
m_sampler_nearest.bind(0);
|
||||
set_active_texture_unit(0);
|
||||
m_rtt.bindTexture();
|
||||
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
|
||||
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
|
||||
.mvp = glm::ortho<float>(-1, 1, -1, 1),
|
||||
.texture_slot = 0,
|
||||
pp::panopainter::execute_legacy_canvas_draw_merge_display_resolve(
|
||||
pp::panopainter::LegacyCanvasDrawMergeDisplayResolveUniforms {
|
||||
.texture = {
|
||||
.mvp = glm::ortho<float>(-1, 1, -1, 1),
|
||||
.texture_slot = 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
.unbind_resolve_framebuffer = [&] {
|
||||
m_rtt.unbindFramebuffer();
|
||||
},
|
||||
.clear_color_buffer = [&] {
|
||||
clear_node_canvas_color_buffer({ 1.f, 1.f, 1.f, 0.f });
|
||||
},
|
||||
.apply_viewport = [&] {
|
||||
apply_node_canvas_viewport(c.x + App::I->off_x, c.y + App::I->off_y, c.z, c.w);
|
||||
},
|
||||
.bind_sampler = [&] {
|
||||
m_sampler_nearest.bind(0);
|
||||
},
|
||||
.bind_resolve_texture = [&] {
|
||||
set_active_texture_unit(0);
|
||||
m_rtt.bindTexture();
|
||||
},
|
||||
.draw = [&] {
|
||||
m_face_plane.draw_fill();
|
||||
},
|
||||
.unbind_resolve_texture = [&] {
|
||||
m_rtt.unbindTexture();
|
||||
},
|
||||
});
|
||||
m_face_plane.draw_fill();
|
||||
m_rtt.unbindTexture();
|
||||
}
|
||||
|
||||
scissor ? apply_node_canvas_capability(pp::renderer::gl::scissor_test_state(), true) : apply_node_canvas_capability(pp::renderer::gl::scissor_test_state(), false);
|
||||
|
||||
Reference in New Issue
Block a user