Drawing marching ants using direct2D RRS feed

  • Question

  • I have to draw a selection feedback like Photoshop in my directx application. I came across an algorithm on wikipedia to do this. But, I am not sure if its the right way to do this especially if my selection area could be any arbitrary geometry. Has someone implemented it using Directx? Any hints are much appreciated.
    Friday, May 31, 2013 9:47 AM

All replies

  • One simple approach is to draw the outline of the selection shape by modulating the shader output with an alternating checkerboard texture.




    Toggle between the two modulating textures every so many frames.  (You don't really need a texture, you can do this entirely in the pixel shader based on screen coordinates.)

    • Edited by Wyck Friday, May 31, 2013 6:46 PM oops.
    Friday, May 31, 2013 6:46 PM