Route stroke preview checkerboard setup through helper
This commit is contained in:
@@ -18,6 +18,11 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
|
|
||||||
## Recent Reductions
|
## Recent Reductions
|
||||||
|
|
||||||
|
- 2026-06-13: DEBT-0036 was narrowed again. `NodeStrokePreview` preview
|
||||||
|
background checkerboard shader setup now routes through
|
||||||
|
`legacy_canvas_draw_merge_services.h`, preserving the existing colorize
|
||||||
|
condition and preview MVP. The retained preview path still owns background
|
||||||
|
capture ordering, texture copies, stroke setup, and draw execution.
|
||||||
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::draw_merge` non-stroke
|
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::draw_merge` non-stroke
|
||||||
`TextureBlend` shader setup now routes through
|
`TextureBlend` shader setup now routes through
|
||||||
`legacy_canvas_draw_merge_services.h`, preserving the optional `TexBG`
|
`legacy_canvas_draw_merge_services.h`, preserving the optional `TexBG`
|
||||||
|
|||||||
@@ -2997,6 +2997,10 @@ Results:
|
|||||||
optional `TexBG` uniform when copy-based blend destination feedback is active.
|
optional `TexBG` uniform when copy-based blend destination feedback is active.
|
||||||
Layer traversal, framebuffer copies, sampler/texture binding, and draw
|
Layer traversal, framebuffer copies, sampler/texture binding, and draw
|
||||||
ordering remain in the legacy Canvas path.
|
ordering remain in the legacy Canvas path.
|
||||||
|
- `NodeStrokePreview` preview background drawing now shares the retained
|
||||||
|
draw-merge shader setup helper for checkerboard uniforms, preserving its
|
||||||
|
colorize condition and preview MVP while leaving capture ordering, texture
|
||||||
|
copies, stroke setup, and draw execution in the retained preview path.
|
||||||
- `Canvas::stroke_draw_mix` now shares the retained stroke composite shader
|
- `Canvas::stroke_draw_mix` now shares the retained stroke composite shader
|
||||||
helper for mixer-pass `CompDraw` setup, while preserving its caller-specific
|
helper for mixer-pass `CompDraw` setup, while preserving its caller-specific
|
||||||
texture slot uniforms. Mixer framebuffer/scissor state, sampler and texture
|
texture slot uniforms. Mixer framebuffer/scissor state, sampler and texture
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "bezier.h"
|
#include "bezier.h"
|
||||||
#include "canvas.h"
|
#include "canvas.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
#include "legacy_canvas_draw_merge_services.h"
|
||||||
#include "legacy_canvas_stroke_composite_services.h"
|
#include "legacy_canvas_stroke_composite_services.h"
|
||||||
#include "legacy_canvas_stroke_execution_services.h"
|
#include "legacy_canvas_stroke_execution_services.h"
|
||||||
#include "legacy_canvas_stroke_preview_services.h"
|
#include "legacy_canvas_stroke_preview_services.h"
|
||||||
@@ -517,10 +518,12 @@ void NodeStrokePreview::draw_stroke_immediate()
|
|||||||
pp::panopainter::execute_legacy_stroke_preview_background_capture(
|
pp::panopainter::execute_legacy_stroke_preview_background_capture(
|
||||||
[&] {
|
[&] {
|
||||||
// copy background color to tex2
|
// copy background color to tex2
|
||||||
ShaderManager::use(kShader::Checkerboard);
|
const float aspect = size.x / size.y;
|
||||||
ShaderManager::u_int(kShaderUniform::Colorize, b->m_tip_mix > 0.f || b->m_blend_mode != 0);
|
pp::panopainter::setup_legacy_canvas_draw_merge_checkerboard_shader(
|
||||||
float aspect = size.x / size.y;
|
pp::panopainter::LegacyCanvasDrawMergeCheckerboardUniforms {
|
||||||
ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho(-.5f, .5f, -.5f / aspect, .5f / aspect, -1.f, 1.f));
|
.mvp = glm::ortho(-.5f, .5f, -.5f / aspect, .5f / aspect, -1.f, 1.f),
|
||||||
|
.colorize = b->m_tip_mix > 0.f || b->m_blend_mode != 0,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
[&] {
|
[&] {
|
||||||
m_plane.draw_fill();
|
m_plane.draw_fill();
|
||||||
|
|||||||
Reference in New Issue
Block a user