Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's wrong with this CI Kernel code?



I'm using a Core Image Kernel to work around the lack of pixel- aligned billboards.

This code :
kernel vec4 pixelAlign(sampler image)
{
vec2 coords = samplerCoord(image);
coords = floor(coords)+0.5;
return sample(image, coords);
}
- works nicely most of the time, except at specific viewport resolutions, where it goes very glitchy, as though parts of the texture are sampling from 1 pixel further along that it should be (http://www.steelskies.com/images/pixelAligned.png)


You can see this in action in this composition - http:// www.steelskies.com/download/PixelAligning.qtz - if you slowly resize the window, you should eventually find a point where it looks badly sampled. I'd be very interested in hearing if this occurs on nVidia hardware - I've only tested it on my 9600.


Is there anything wrong with the above kernel code? Is there any workaround for the glitches I'm seeing?



Thanks, Jon

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.