From 8348dc5bf8575660afc4a66d216a9cf5b5a0f18b Mon Sep 17 00:00:00 2001 From: omigamedev Date: Sat, 13 Jun 2026 05:28:27 +0200 Subject: [PATCH] Route VR checkerboard setup through helper --- docs/modernization/debt.md | 4 ++++ docs/modernization/roadmap.md | 3 +++ src/app_vr.cpp | 9 ++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 3a309c3..dbcaf52 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -18,6 +18,10 @@ agent or engineer to remove them without reconstructing context from chat. ## Recent Reductions +- 2026-06-13: DEBT-0036 was narrowed again. Desktop VR checkerboard background + shader setup now routes through `legacy_canvas_draw_merge_services.h`; VR + still owns render state transitions, per-plane transforms, and draw + execution. - 2026-06-13: DEBT-0036 was narrowed again. `CanvasModeMaskCut::apply` retained `CompDraw` shader setup now routes through `legacy_canvas_stroke_composite_services.h`; mask-cut still owns render-task diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index 2747269..1cf844f 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -3021,6 +3021,9 @@ Results: stroke composite shader setup helper, while render-task ordering, framebuffer copy bounds, sampler/texture binding, and draw execution remain in retained canvas-mode code. +- Desktop VR checkerboard background drawing now shares the retained draw-merge + shader setup helper, while render state transitions, per-plane transforms, + and draw execution remain in retained VR code. - `Canvas::stroke_draw_mix` now shares the retained stroke composite shader helper for mixer-pass `CompDraw` setup, while preserving its caller-specific texture slot uniforms. Mixer framebuffer/scissor state, sampler and texture diff --git a/src/app_vr.cpp b/src/app_vr.cpp index 8ad1603..7bfc559 100644 --- a/src/app_vr.cpp +++ b/src/app_vr.cpp @@ -3,6 +3,7 @@ #include #include "app.h" +#include "legacy_canvas_draw_merge_services.h" #include "legacy_canvas_stroke_composite_services.h" #include "legacy_canvas_stroke_erase_services.h" #include "legacy_ui_gl_dispatch.h" @@ -274,9 +275,11 @@ void App::vr_draw(const glm::mat4& proj, const glm::mat4& camera, const glm::mat canvas->m_canvas->m_plane_transform[plane_index] * glm::translate(glm::vec3(0, 0, -1)); - ShaderManager::use(kShader::Checkerboard); - ShaderManager::u_int(kShaderUniform::Colorize, false); - ShaderManager::u_mat4(kShaderUniform::MVP, plane_mvp); + pp::panopainter::setup_legacy_canvas_draw_merge_checkerboard_shader( + pp::panopainter::LegacyCanvasDrawMergeCheckerboardUniforms { + .mvp = plane_mvp, + .colorize = false, + }); m_face_plane.draw_fill(); }