Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug Incorrect Normals for Flipped Tiles

Discussion in '2D' started by JamesPaton13, May 21, 2024.

  1. JamesPaton13


    Sep 1, 2020
    Normals are incorrect for flipped tiles on tilemap (see image). Normals were added as a Secondary Texture.
    I have tested this in 2021.3.38, 2022.3.29, 2023.2.17, and 6000.0.2 with the same results.

    Is there a workaround for this beyond creating manually flipped versions for every tile?
    When using Sprites, I believe the solution is to use the X and Y flip boxes on the Sprite Renderer rather than scaling the sprite, this flips the normals correctly but I don't believe such boxes exist for the Tilemap.

    I tried to flip the normals myself in a custom shader however it seems there is no information available that can determine if a tile is flipped.
    I have checked the following nodes in Shader Graph and as best as I can tell, they cannot distinguish between a flipped and a regular tile: Transformation Matrix, Transform, Normal Vector, Tangent Vector, Bitangent Vector.

    Any info would be appreciated,

    Attached Files: