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

There is a mismatch in secondary textures of sprites wasting texture space and potentially break dra

Discussion in '2D' started by scozirge, Apr 25, 2022.

  1. scozirge

    scozirge

    Joined:
    Feb 24, 2015
    Posts:
    77
    I use Unity Version 2021.3.1f1.32
    When I set secondary sprite for normal map and press Atlas Pack preview, it shows Warning Log
    "There is a mismatch in secondary textures of sprites wasting texture space and potentially break draw call batching."
    upload_2022-4-26_4-2-7.png
    upload_2022-4-26_4-3-20.png
    After that, I play the game, and the sprites with secondary normal maps are broken(got black lines).
    upload_2022-4-26_3-58-56.png

    How can I fix it, thanks!
     

    Attached Files:

  2. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    618
    This indicates that some textures packed into the Atlas do not have Secondary Textures set. If this is not the case, could you please submit a bug report with a repro project ? Will take a look asap.
    Does the issue occur only when using SpriteAtlas ? We are backporting a fix for a related issue (https://issuetracker.unity3d.com/is...ary-texture-normal-maps-in-linear-color-space) Will post an update once the backport for 2021 is available. Thanks.
     
  3. scozirge

    scozirge

    Joined:
    Feb 24, 2015
    Posts:
    77
    Sorry, It turns out that sprite imports into Unity and set Texture Type to normal map, the Non-Power of 2 marks as ToNearest I need to set to None so the texture size won't go wrong and cause some issue. Didn't know that before
    Didn't know that before.
    upload_2022-4-30_16-54-51.png upload_2022-4-30_16-55-52.png