You are aware that OpenGL clamps a lot of values internally, correct? You'll need to use "32 bit" Render in Image patches to get negative values to work I believe (you may still be at the whim of what various vendors do). Most GL texture formats clamp, so this can be tricky to deal with :( The implicit clamp can be super annoying for GPGPU type workflows, as you've discovered.
Anyway, here's a quick demo for negatives (I didn't go beyond +-1 though, but it probably functions there too). Does it more or less do what you're looking for (you should see a red spinning rectangle where the negative values are)?
negative.qtz
Description: application/quartzcomposer
You'll probably be stuck working explicitly in Alpha = 1 domain, since QC likes premultiplication a lot, and premultiplication will destroy fidelity at best, and at worst will do the wrong thing entirely. Also note that "32 bit" here means 32 bits per component, so each pixel will consume 16 bytes of vram (4 32-bit floats). This can be rather taxing for some GPUs, as the textures are much larger than more pedestrian 8-bit-per-component images, and might exhaust vram if your images are sufficiently large. Fillrate will also be adjusted accordingly (~25% of the normal pixels per second). On May 28, 2014, at 2:47 PM, Patrick Sheffield <[email protected]> wrote: > > I've been having a devil of a time with this in Quartz Composer. > > I wanted to analyze an image, store the information in a buffer, then use > that buffer for subsequent iterative processing of the image (why I need to > store the information first). > > The problem is that the analysis can produce positive and negative numbers > (and potentially under -1 or over 1) and Quartz Composer won't leave the > values alone EVEN if I calculate them using a GLSL program inside a Render In > Image with the flag set to Disable Color Correction. I think it simply clips > off the negative values. > > I tried compressing the range by adding 1 and dividing by 2, but that is less > than effective. I also tried the secret preference of turning off correct > Core Image. That had no effect, plus I can't guarantee it'll be turned off on > another system. > > Is there ANY way to store a buffer of information and access it later without > QC diddling with it when it enters a pipe? > > Thanks in advance, > > Patrick > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Quartzcomposer-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/quartzcomposer-dev/christopher_wright%40apple.com > > This email sent to [email protected] -- Christopher Wright [email protected]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

