Can I use sprites coming from Atlas like TexturePacker ?



  • Hi,
    To optimise my Draw Batches, I use the famous TexturePacker Tool to create Atlases, it's a common best practice
    I see that Shadero works only with the textures, and not with sprites (like the Sprite property in the SpriteRenderer component, that opens the window "Select Sprite", not the "Select Texture2D" like Shadero)
    When I choose "New Texture", I can't select a sprite, only a texture. So I use a dummy sprite to test, but use a "Main Texture" at the final
    I need to use the "Main Texture", because my shaders is applied for 20 or 30 differentes sprites, and I dont want to create 20 or 30 shaders just to change the texture

    But, I see a problem with this solution, because Shadero applies the effects not to the sprite (that is a part of a 2D texture), but to the complete texture
    It's not a problem for effects like HDR, Desintegration... because the effect is applied uniformly to the texture, but a big problem for UV using that not uniform

    For example, I try to use a Animated Rotation UV, and the first problem is the x,y position that is not over the sprite, and the second problem is that I see a part of the texture corresponding to other sprites on the same texture following the values of parameters

    I dont want to add a unity sprite mask, because I have to create too many, and the sprite position on the generated texture changes after adding new sprite (space using optimisation)
    I try to add a "generated RGBA circle" and use it in a "Mask with RGBA" and it's ok with my simple sprite, but the position at runtime with my atlas is (of course) bad. It's not centered on the sprite. And impossible to use fixed coordinates with an atlas

    How can I work with sprites in an Atlas texture and UV ? I miss something I suppose

    Thanks


 

Looks like your connection to Vetasoft Assets was lost, please wait while we try to reconnect.