Draw a smooth, expanding circle.

I want to create a sonar ping, where when it is activated, the circle comes from the position of the vessel. However, if I use a texture and scale it as the circle grows, the thickness of the circle increases, and I tried to use a sprite, but the sheet size needed to make the extension look smooth, impractical. How will I program a smooth expanding circle?

+6
source share
1 answer

Depending on how complex the shape you are trying to create, you can do this entirely in a pixel shader. See this article for an example of how to draw very simple smooth circles in this way.

+4
source

All Articles