Nrjwolf / unity-shader-sprite-radial-fill

Radial fill mask for sprite
179 stars 29 forks source link

Made a small change so it would work with Multiple Sprite textures. #5

Open tiagoacarvalho opened 2 years ago

tiagoacarvalho commented 2 years ago

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

tiagoacarvalho commented 2 years ago

By multiple sprite textures I meant sprite atlas.