Hi,
I’d like to use elliptical texture coordinates for a HUD effect without using textures so that the aspect ratio of the ellipse / circle can adjust dynamically with the screen aspect ratio.
What I need are two elliptical gradients (U tex coord and V tex coord) like in the two attached animations below.
The white border represents the scale of the texture / size of the screen. As you can see in the two animations, the thickness of the ellipse dynamically adjusts as the aspect ratio changes to prevent the ellipse from squashing / stretching. I thought about using two elliptical textures but they will be squashed / stretched when the aspect ratio changes and so I’d like to solve the problem with some shader magic.
Is this possible and how would you do this? Seems like a non trivial problem and I’m thankful vor any tip
Best regards,
Daniel