Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Using SpriteAtlas as texture in custom shader

Discussion in '2D' started by domenicobrz, Nov 25, 2017.

  1. domenicobrz

    domenicobrz

    Joined:
    Sep 27, 2017
    Posts:
    1
    If I have a pre-made texture atlas for a 2D game, I can use the editor to slice it in grids of quads and use the resulting texture in a custom shader, where I can apply also other textures of the same sprite-sheet (normal maps, subsurface scattering etc.)

    The problem of course results in having quads instead of polygonal meshes surrounding my sprites, which adds potential overdraw to the application and reduces the number of sprites I can pack in a single 2048x2048 texture

    The new SpriteAtlas system creates an atlas from a set of sprites, which are delimited by polygon meshes instead of a quad, but unfortunately I can't use the spriteAtlas as a texture for a custom shader

    How are you supposed to use them in this scenario?
     
  2. Samacvuk

    Samacvuk

    Joined:
    Jan 8, 2017
    Posts:
    30
    You need to extend and create your own solution for this I believe.