umlaeute / Gem

Graphics Environment for Multimedia (official repository)
https://gem.iem.at
Other
98 stars 28 forks source link

pix_offset doesn't wrap values as help says #421

Closed jamshark70 closed 3 months ago

jamshark70 commented 3 months ago

Detail

pix_offset help: 'When adding an offset to each color-channel, no clipping is done. Thus you can wrap around the color-space. (adding "1 0 0" to "0.5 1 1" will result in "0.5 1 1" instead of "1 1 1")'

However the source code says CLAMP and I decidedly do not observe wrapping behavior. The solid red block is obviously (red channel + 1).clip(0, 1), and not (red + 1) % 1.0.

I was trying to use this to rotate hsv's hue, but if it doesn't rotate, then I'm stuck.

pd-offset-clamp

Gem Version

0.94.git v0.94-651-g199e8d21

Pd Version

0.54.0

Operating System

Linux

OS Version

Ubuntu Studio 22.04

Which CPU are you using?

amd64/x86_64 ("64bit Intel")

jamshark70 commented 3 months ago

OK, so it's an out of date help file. If I send "saturate 0" to left inlet, then it works.

But the only way any user can discover this is by reading the source code, since the word "saturate" is not found anywhere in pix_offset-help.pd.

So this isn't a "bug" exactly but it does require a documentation fix.

umlaeute commented 3 months ago

Thanks for doing the research. Yes, the help patch should be updated.

Sidenote: are you sure that you are using Pd-0.54-0? Mine does not have spline connections...

jamshark70 commented 3 months ago

Sidenote: are you sure that you are using Pd-0.54-0? Mine does not have spline connections...

I'm using pdnext because the original version makes no accommodation for people with vision problems who struggle to look at bright white backgrounds for long periods of time.

umlaeute commented 3 months ago

fair enough, but have you reported this on https://github.com/pure-data/pure-data/issues ?