Route object composite texture setup through helper

This commit is contained in:
2026-06-13 05:31:46 +02:00
parent b98635a8bb
commit ed05ba453e
3 changed files with 13 additions and 3 deletions

View File

@@ -3199,9 +3199,11 @@ void Canvas::draw_objects(std::function<void(const glm::mat4& camera, const glm:
// draw the tmp layer into the actual layer
if (has_data)
{
ShaderManager::use(kShader::Texture);
ShaderManager::u_int(kShaderUniform::Tex, 0);
ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho(-0.5f, 0.5f, -0.5f, 0.5f));
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
.mvp = glm::ortho(-0.5f, 0.5f, -0.5f, 0.5f),
.texture_slot = 0,
});
set_active_texture_unit(0);
m_sampler_nearest.bind(0);
rtt.bindTexture();