So I went directly into the problem of "Radial, yes, but centered where?" when I tried to use this with a Multiple-type Sprite (aka a Texture that is a SpriteSheet, containing multiple sprites.)
The shader produces the radial fill from the center of the whole spritesheet, not from the center of the specific sprite.
My work around was to add Position X and Position Y, and offset the center. A small change for a small gain. Here is the code, up to you whether to push it or not.
And I apologize in advance for having modified your code without asking.
So I went directly into the problem of "Radial, yes, but centered where?" when I tried to use this with a Multiple-type Sprite (aka a Texture that is a SpriteSheet, containing multiple sprites.)
The shader produces the radial fill from the center of the whole spritesheet, not from the center of the specific sprite.
My work around was to add Position X and Position Y, and offset the center. A small change for a small gain. Here is the code, up to you whether to push it or not.
And I apologize in advance for having modified your code without asking.
Modified shader: RadialFill.zip