Search Unity

Feedback Request: Sprites square UVs written in UV1

Discussion in '2D' started by Robotic, Sep 19, 2019.

  1. Robotic

    Robotic

    Joined:
    Apr 14, 2013
    Posts:
    3
    Hello, I had a small request for the sprite system, I don't know if there's a better place to do it (If so please link me to it! My research only let me find that the feedback site doesn't exist anymore and that requests have to be made on the forum)

    So my suggestion is: what if meshes generated by the sprite renderer system had the coordinates of their "own" UV written in the second UV channel? A sprite currently has the UV coordinates from the texture it uses in its first UV channel, which makes sense, but I think it could be practical if the second UV channel had coordinates from 0,0 to 1,1.

    This would allow for these coordinates to be used in shaders, for example, when using a spritesheet with many characters, we could add an effect that uses their sprite coordinates without needing to remap their coordinates for each different sprite (if I want to do a swipe from top to bottom, for example)

    The feature could take the form of a checkbox on the sprite "write normalized uv coordinates to UV channel 1" or something on the sprite asset, if we want to keep sprites light and without these values by default.

    I know this might seem like a very specific feature that would be unnecessary to most people, but I just think it could be useful to have some kind of UV info on the sprite that is relative to the quad mesh itself, more than the texture represented. Users would still be in control of how their sprites are cut, and it would let us map effects "per sprite" without doing our own custom meshes
     
    mgear, DragonCoder, Lo-renzo and 6 others like this.
  2. cNoNim

    cNoNim

    Joined:
    Nov 9, 2017
    Posts:
    2
    Any news about subject?
     
  3. ZX-Spectrum

    ZX-Spectrum

    Joined:
    Jul 8, 2017
    Posts:
    2
    I wanna that too...
     
  4. makarosokin

    makarosokin

    Joined:
    May 25, 2018
    Posts:
    1
  5. Sandler

    Sandler

    Joined:
    Nov 6, 2015
    Posts:
    241
    yeah good idea, please add the possiblity to add aditional uv channels to sprites
     
  6. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,514
    Yeah. The ability to pass more data per sprite without resorting to hacks or custom meshes would expand what's possible to do within the friendly SpriteRenderer ecosystem.
     
  7. ZX-Spectrum

    ZX-Spectrum

    Joined:
    Jul 8, 2017
    Posts:
    2
    I'll raise the topic, it's still relevant