Drawing circles with Pixelbender

I am not sure, if this makes any sense at all, but if you ever need to draw antialiased circles in Pixelbender, here is a quite simple solution. I had the idea after watching Mario Klingemanns and Ralph Hauwerts sessions at Flash on the Beach. They were talking about the bad idea of using conditions like if/else in Pixelbender shaders. So this solution runs without any branches and makes just use of built-in functions min/max.


Update: There is a useful application for that!

6 thoughts on “Drawing circles with Pixelbender”

Comments are closed.