Drawing circles with Pixelbender

October 19th, 2010

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.

Circles.pbk

Update: There is a useful application for that!

Filed under: +

6 Responses to “Drawing circles with Pixelbender”

  1. Tweets that mention Andre Michelle » Blog Archive » Drawing circles with Pixelbender -- Topsy.com Says:
    October 19th, 2010 at 12:25 pm

    [...] This post was mentioned on Twitter by Mrinal Wadhwa, Andre Michelle. Andre Michelle said: Blogpost > http://blog.andre-michelle.com/2010/drawing-circles-with-pixelbender [...]

  2. Pedram Says:
    October 19th, 2010 at 1:29 pm

    thanks.

  3. iphone reparatur Says:
    November 19th, 2010 at 2:52 pm

    Thamkx for this .

  4. iPhone Repair Says:
    October 14th, 2011 at 11:33 pm

    Thamkx for this .

  5. Dieter Krieftewirth Says:
    November 12th, 2012 at 9:03 pm

    I feel a little dizzy now. Those circles almost have the same effect as optical illusions! :P Thanks!

  6. Iphone Pixel Says:
    February 10th, 2013 at 11:27 am

    FYI: PyPy uses a tracing JIT and it can JIT-compile even code dynamically generated inside an eval().

    I don’t know how they do that.