Route colorize mask and slider shader setup through helpers

This commit is contained in:
2026-06-13 05:57:08 +02:00
parent 5ab06a42e3
commit 20ecffa18c
7 changed files with 109 additions and 15 deletions

View File

@@ -38,9 +38,7 @@ void NodeSliderH::draw()
glm::mat4 pos = glm::translate(glm::vec3(cur_pos , 0));
auto mvp = m_proj * pos * scale;
ShaderManager::use(kShader::Color);
ShaderManager::u_mat4(kShaderUniform::MVP, mvp);
ShaderManager::u_vec4(kShaderUniform::Col, { 0, 0, 0, 1 });
pp::panopainter::configure_legacy_slider_color_shader(mvp);
m_plane.draw_fill();
}
@@ -162,10 +160,9 @@ glm::vec4 NodeSliderHue::get_hue()
void NodeSliderHue::draw()
{
ShaderManager::use(kShader::ColorHue);
ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp * glm::scale(glm::vec3(1, -1, 1)));
//ShaderManager::u_vec4(kShaderUniform::Col, m_color);
ShaderManager::u_int(kShaderUniform::Direction, m_comp); // set vertical
pp::panopainter::configure_legacy_slider_hue_shader(
m_mvp * glm::scale(glm::vec3(1, -1, 1)),
m_comp);
m_plane.draw_fill();
NodeBorder::m_color = glm::vec4(0);
NodeSliderH::draw();