I'm trying to create a jitter effect (using jit.op or some other object through which I can pass an existing matrix) where each pixel has its luminance increased, as if the H portion of the HSL notation had been increased.
So for example, if luminance runs from 0.0 to 1.0, and we fed in a parameter of 0.3, then the luminance value of each pixel increases by 0.3. Thus, pure red would become pink, muddy yellow would become a brighter yellow, etc. Luminance would be capped at 0.1, so any pixel that was already close to full luminance would just look white.
I've attached a screenshot to make my intentions clear.
I tried jit.brcosa (using the @brightness attribute), but this does not raise a pixel above it's original luminance - it can only reduce it.
I have a hunch that I will need to convert each pixel value to HSL, increase the L portion, then convert back to RGB. I have the required formulas from http://easyrgb.com/index.php?X=MATH
- but I'm not sure how I would use them in Max. Is this a job for Gen perhaps?