I am attempting to play back a small video and use nearest neighbor interpolation to acheive that lovely pixelated look.

Quite fitting, given the material ;) Should warn people before such dangerous trips down memory lane :)

How does one then apply a nearest neighbor interpolation? Im assuming I have to build a simple CIKernel to do this with fract and samplerCoords or somesuch?


Your problem doesn't like in the filter, but in the stupid billboard: mouse-over the image output from the filter, and you'll see that the resolution is really low (36x45) -- the billboard _always_ does linear interpolation to scale the image, regardless of how you set the CI filter stuff.

What you'll want to do is this:

Find the image resizer, and upscale the movie output by some big value (x8 or x16 is good, but feel free to experiment).

Then, change your filter to essentially be a mosaic function, like this:

kernel vec4 multiplyEffect(sampler image)
{
        return sample(image,//samplerCoord(image));
                vec2(
                        floor(samplerCoord(image).x/8.)*8.,
                        floor(samplerCoord(image).y/8.)*8.)
                );
}

You can change the 8.'s to be whatever you decide to scale up by. This'll give you some 1980's pixelated goodness :)

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

_______________________________________________
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]

Reply via email to