I want to create a sonar ping, where when it is activated a circle emanates from a ship's position. However, if I use a texture and scale it up as the circle gets bigger, the thickness of the circle increases as well, and I've tried to use a spritesheet but the size of the sheet needed to make the expansion look smooth is impractical. How would I go about programming a smooth expanding circle?
Depending on how complicated the shape that you're trying to produce is, you might be able to do it entirely in a pixel shader. See this article for an example of how to draw very simple anti-aliased circles in this way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With