Search Unity

Question Lightmap texture appearing on skinned meshes

Discussion in 'General Graphics' started by Illusion-Walk, Sep 3, 2020.

  1. Illusion-Walk

    Illusion-Walk

    Joined:
    Feb 18, 2015
    Posts:
    2
    Hi everyone,
    we are experiencing a strange rendering issue (possibly a bug) where one entire baked lightmap gets drawn onto a skinned mesh renderer. The lightmap appears and disappears depending on the viewing angle (see screenshots). This issue is very likely to be the same as this one https://answers.unity.com/questions/1454194/lightmap-textures-appearing-where-they-shouldnt-in.html.
    In both cases it only appears in the build and not in the editor. Our setup:

    * Unity 2019.4.7
    * buildin rendering pipeline (no URP or HDRP)
    * multiple addive loaded scenes each baked with the Progressive (CPU) lightmapper and shadowmask as lighting mode for mixed lights
    * there are also baked lightprobes and reflection probes present
    * the skinnend mesh renderer affected uses two material channels, each using a custom shader, built with Shader Forge (another similarity to the question linked above)
    * VR Application running on Oculus Rift-S

    Maybe someone can spot an issue in the shader code (see attachments) or give any suggestions on where to look further to hunt down this bug?

    Much appreciated.




    Hands rendering normally


    Lightmap gets drawn on hands
     

    Attached Files:

    Last edited: Sep 3, 2020
    ClausKleber likes this.