Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Normal map makes mesh dark

Discussion in 'Shader Graph' started by UserNobody, Apr 27, 2021.

  1. UserNobody

    UserNobody

    Joined:
    Oct 3, 2019
    Posts:
    144
    Hello there,
    For some reason, the normal map makes the mesh dark when the mesh is rotated. I use a simple graph, I have two texture 2d arrays and I sample two different textures, and I lerp the result based on the 'steepness' of the mesh using the dot product. The frag normal space is Tangent and whenever I sample a normal map texture from the Texture2DArray I unpack the sampled output in tangent space as well.
    If I do not connect the normal map to the frag shader in issue is not present, but if it's connected the issue appears. I am not sure what could be the cause of this, could someone help me with this?

    This is the graph:

    upload_2021-4-27_16-12-6.png

    upload_2021-4-27_16-12-31.png

    upload_2021-4-27_16-12-50.png

    And this is the issue. Generally, it would look fine, like all the other meshes, however, the dark mesh is rotated 180 degrees and that's why it looks like that.

    upload_2021-4-27_16-14-3.png