A shader that transform colors into circles

Hello everybody,

I want to write a shader that transform a material’s color or texture into circle ( or dots ) of it and let the rest white or in another color. Like the following

39664-exampl.png

I studied shader in the last days, and I’ve done a lot of researches about a similar effect that could have been created by someone, but I didn’t found any. I don’t know how to proceed to do it. Do you have any indication on how to do it, or a starting point, or even a snippet of script that do something similar. It could be a post-processing shader or directly assigned to the object, It doesn’t matter because I want to apply it to all objects in the scene.

Thanks

Sounds like you’re describing halftone. There’s a tutorial here for WebGL that should be pretty easy to adapt for Cg: http://webstaff.itn.liu.se/~stegu/webglshadertutorial/shadertutorial.html

alt text