Route stroke mixer composite setup through helper
This commit is contained in:
@@ -21,6 +21,11 @@ struct LegacyStrokeCompositeUniforms {
|
||||
glm::vec2 resolution {};
|
||||
LegacyStrokeCompositePatternUniforms pattern;
|
||||
glm::mat4 mvp { 1.0f };
|
||||
int texture_slot = 0;
|
||||
int stroke_texture_slot = 1;
|
||||
int mask_texture_slot = 2;
|
||||
int dual_texture_slot = 3;
|
||||
int pattern_texture_slot = 4;
|
||||
float layer_alpha = 1.0f;
|
||||
bool alpha_lock = false;
|
||||
bool mask_enabled = false;
|
||||
@@ -69,11 +74,11 @@ inline void setup_legacy_stroke_composite_shader(
|
||||
const LegacyStrokeCompositeShaderExecution& execution) noexcept
|
||||
{
|
||||
execution.use_shader(kShader::CompDraw);
|
||||
execution.set_int(kShaderUniform::Tex, 0);
|
||||
execution.set_int(kShaderUniform::TexStroke, 1);
|
||||
execution.set_int(kShaderUniform::TexMask, 2);
|
||||
execution.set_int(kShaderUniform::TexDual, 3);
|
||||
execution.set_int(kShaderUniform::TexPattern, 4);
|
||||
execution.set_int(kShaderUniform::Tex, uniforms.texture_slot);
|
||||
execution.set_int(kShaderUniform::TexStroke, uniforms.stroke_texture_slot);
|
||||
execution.set_int(kShaderUniform::TexMask, uniforms.mask_texture_slot);
|
||||
execution.set_int(kShaderUniform::TexDual, uniforms.dual_texture_slot);
|
||||
execution.set_int(kShaderUniform::TexPattern, uniforms.pattern_texture_slot);
|
||||
execution.set_vec2(kShaderUniform::Resolution, uniforms.resolution);
|
||||
execution.set_float(kShaderUniform::Alpha, uniforms.layer_alpha);
|
||||
execution.set_int(kShaderUniform::Lock, uniforms.alpha_lock);
|
||||
|
||||
Reference in New Issue
Block a user