Closed belbeeno closed 1 year ago
The idea was: UVAtlas
is to locate texture part on atlas and it shouldn't be changed in common case after sprite was created. The one who should be changed during runtime is UVTilingAndOffset
which has Reactive
update mode.
Oh, huh... is that like a planned change to Foundation for later? Because I see the update to the shader as well as the baker in a4b75ea but can't find any changes to SpriteUVAnimationSystem.cs
to reflect the use of this new UVTilingAndOffset
component... unless I'm missing something?
Yeah, you're right, I have a little mess with those UV components. So animation system now uses UVAtlas
but it should use UVTilingAndOffset
but later uses different calculation, so I must rewrite animation system a bit. For a meantime I will set UVAtlas
to Reactive
mode.
I was wrong about my vision about what component should be shifted in animation system. I think that tiling and offset should be independent from animation because it is not about locating something on texture in the 1st place but about tiling and offset something (bruh). So now both components are Reactive
and animation system works with UVAtlas
as previously.
I believe the update mode for _uvAtlasBuffer should be changed from
Static
toReactive
as it is updated every time theNSprite.UVAtlas
component changes.https://github.com/Antoshidza/NSprites-Foundation/blob/a4b75ea4ed2e8877c29402e463f56e3b502d31e1/Graphics/Regular%20Render/RegularSprite_PropertiesSet.asset#L17