Reputation: 93
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?
Upvotes: 6
Views: 767
Reputation: 4857
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.
Upvotes: 4