On Sep 23, 2009, at 11:53 AM, Stonewall Ballard wrote: ...
I had tweaked the 2D Fluid Simulation patch to use the offset values, but I couldn't believe that it was written to use signed values if they weren't available. After poking around some more, I found that an OpenCL Kernel set to "default" uses whatever it gets. Feeding 8-bit images into the 2D Fluid Simulation forces it to use 8- bit internally, which breaks the computation.
...
This turns out to be wrong. I enabled the private preference that shows the image format in tooltips, and tracing through the original 2D Fluid Simulation patch, I found that it does run internally with signed float images. An OpenCL Kernel will output float images if any of its input images are float, and the pressure initializer internal to the patch is set to generate an all-zero float image. This propagates through the rest of the patch and ends up causing the internal image outputs to generate floats too.
I believe that the reason I was misled originally is that I assumed that the velocity input would take a normal (8-bit) red-green vector image, but it really requires a signed image with black (zero) being "no velocity".
I hope that's the real answer now. - Stoney -- Stonewall Ballard [email protected] http://stoney.sb.org/ _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

