From 24dc97817847711f507f577fda65bd30986bf0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kol=C3=A1=C5=99?= Date: Wed, 8 Jan 2025 10:36:46 +0100 Subject: [PATCH] HSV node - alpha color support --- src/nodes/WebGL/HSV.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nodes/WebGL/HSV.ts b/src/nodes/WebGL/HSV.ts index 9e76db3..e5842c0 100644 --- a/src/nodes/WebGL/HSV.ts +++ b/src/nodes/WebGL/HSV.ts @@ -54,10 +54,11 @@ export default class HSV extends WebGL { } void main() { - vec3 c = rgb2hsv(texture2D(u_image, v_texCoord).rgb); + vec4 texColor = texture2D(u_image, v_texCoord); + vec3 c = rgb2hsv(texColor.rgb); gl_FragColor = vec4( hsv2rgb(vec3(c.x + u_shift.x, c.y * u_shift.y, c.z * u_shift.z)), - 1 + texColor.a ); } `