Search Unity

ARMs guide to Global Illumination with Enlighten

Discussion in 'Global Illumination' started by KEngelstoft, Jun 17, 2016.

  1. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    The part about using Enlighten in custom shaders was interesting (maybe it should make its way into the manual as well, somehow?)

    I read through that part a few times but I'm still not clear. If you are using only non-direcational baked static lightmaps and nothing else, is the old:

    Code (csharp):
    1. c.rgb *= DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uv[1]));
    Still good enough?
     
  3. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Yes, this is still the way to do it. You can have a look at UnityGI_Base which is used by the Standard.shader if you want to see how all the variants are decoded.
     
    AcidArrow likes this.
  4. clevermango

    clevermango

    Joined:
    Jan 7, 2015
    Posts:
    32
    Thanks for sharing that, very useful document indeed!
     
  5. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076
  6. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
  7. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,076