Skip to content

Commit

Permalink
make modulateHue a real color combination function
Browse files Browse the repository at this point in the history
  • Loading branch information
delanni committed Oct 8, 2024
1 parent b4094f2 commit 9fa7712
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions bundle.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -19927,16 +19927,20 @@
},
{
name: 'modulateHue',
type: 'combineCoord',
type: 'combine',
inputs: [
{
type: 'float',
name: 'amount',
default: 1,
}
],
glsl:
` return _st + (vec2(_c0.g - _c0.r, _c0.b - _c0.g) * amount * 1.0/resolution);`
glsl:`
vec3 hsl0 = _rgbToHsv(_c0.rgb);
vec3 hsl1 = _rgbToHsv(_c1.rgb);
hsl0.r += hsl1.b * amount;
hsl0.r = fract(hsl0.r);
return vec4(_hsvToRgb(hsl0.rgb), _c0.a);`
},
{
name: 'invert',
Expand Down Expand Up @@ -49423,18 +49427,23 @@
xy += 0.5;
return xy;`
},
// This is where it doesn't seem to matter
{
name: 'modulateHue',
type: 'combineCoord',
type: 'combine',
inputs: [
{
type: 'float',
name: 'amount',
default: 1,
}
],
glsl:
` return _st + (vec2(_c0.g - _c0.r, _c0.b - _c0.g) * amount * 1.0/resolution);`
glsl:`
vec3 hsl0 = _rgbToHsv(_c0.rgb);
vec3 hsl1 = _rgbToHsv(_c1.rgb);
hsl0.r += hsl1.b*amount;
hsl0.r = fract(hsl0.r);
return vec4(_hsvToRgb(hsl0.rgb), _c0.a);`
},
{
name: 'invert',
Expand Down

0 comments on commit 9fa7712

Please sign in to comment.