Route final texture setup sites through helper
This commit is contained in:
@@ -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. `NodeCanvas` density-resolve and
|
||||
desktop VR UI `Texture` shader setup now route through
|
||||
`legacy_canvas_draw_merge_services.h`; those paths still own render target,
|
||||
sampler/texture binding, viewport/state restoration, and draw execution.
|
||||
- 2026-06-13: DEBT-0036 was narrowed again. `CanvasModeTransform::on_Draw`
|
||||
and `CanvasModeFloodFill::on_Draw` retained `Texture` shader setup now route
|
||||
through `legacy_canvas_draw_merge_services.h`; the mode paths still own
|
||||
|
||||
@@ -3051,6 +3051,10 @@ Results:
|
||||
share the retained draw-merge texture shader setup helper for `Texture`,
|
||||
`Tex`, and `MVP` setup. Texture/sampler binding, viewport/state setup, and
|
||||
draw execution remain in the node paths.
|
||||
- `NodeCanvas` density-resolve drawing and desktop VR UI drawing now share the
|
||||
retained draw-merge texture shader setup helper, while render target,
|
||||
sampler/texture binding, viewport/state restoration, and draw execution
|
||||
remain in retained node/VR code.
|
||||
- `CanvasModeTransform::on_Draw` and `CanvasModeFloodFill::on_Draw` now share
|
||||
the retained draw-merge texture shader setup helper for `Texture`, `Tex`, and
|
||||
`MVP` setup. Active texture selection, sampler/texture binding, and draw
|
||||
|
||||
@@ -475,9 +475,11 @@ void App::vr_draw(const glm::mat4& proj, const glm::mat4& camera, const glm::mat
|
||||
glm::translate(glm::vec3(0, 0, -1)) *
|
||||
glm::scale(aspect * tan_fov);
|
||||
sampler_linear.bind(0);
|
||||
ShaderManager::use(kShader::Texture);
|
||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, mvp);
|
||||
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
|
||||
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
|
||||
.mvp = mvp,
|
||||
.texture_slot = 0,
|
||||
});
|
||||
set_active_texture_unit(0);
|
||||
uirtt.bindTexture();
|
||||
m_face_plane.draw_fill();
|
||||
|
||||
@@ -765,9 +765,11 @@ void NodeCanvas::draw()
|
||||
m_sampler_nearest.bind(0);
|
||||
set_active_texture_unit(0);
|
||||
m_rtt.bindTexture();
|
||||
ShaderManager::use(kShader::Texture);
|
||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho<float>(-1, 1, -1, 1));
|
||||
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
|
||||
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
|
||||
.mvp = glm::ortho<float>(-1, 1, -1, 1),
|
||||
.texture_slot = 0,
|
||||
});
|
||||
m_face_plane.draw_fill();
|
||||
m_rtt.unbindTexture();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user