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

Question Lightmap looks different between built-in pipeline and URP

Discussion in 'Universal Render Pipeline' started by Kichang-Kim, Jul 13, 2020.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    979
    Hi. I have some problem about lightmapping.

    In my project, I merged lightmap texture to diffuse texture for LOD mesh, by generating new textures (pre-multiplied lightmap pixel values).

    With built-in pipeline, this works well regardless of project's color space (gamma or linear). It looks similar the original texture with lightmapped and pre-lightmapped LOD texture.

    But URP with gamma space, it shows different result. The color is very different between original and LOD. (URP with linear space works without problem, like built-in pipeline)

    So I wonder that URP's lightmap calculation in gamma space is changed? any documentation about this?

    Thanks.
     
  2. eHaka

    eHaka

    Unity Technologies

    Joined:
    Jan 23, 2020
    Posts:
    11
  3. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    979
    @ErikHakala I found that this issue is related to SH value, not lightmap itself.

    My LOD shader contains SampleSHPixel() and it makes final pixel value incorrect. So I removed it and now works correctly.