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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Lightmapping and mobile

Discussion in 'Global Illumination' started by martaaay, Mar 15, 2018.

  1. martaaay

    martaaay

    Joined:
    Apr 13, 2009
    Posts:
    136
    Many of my static objects are using Standard shader for best light mapping results. After the light map is generated, what happens when deploying on mobile? Do I still get the expensive standard shader performance on mobile? Or does it turn into a nice simple shader that combines the light map with the albedo texture?

    If the latter, does anybody have any recommendations on a workflow for mobile? Does anybody else generate the light map and change the shader to something like 'diffuse' at build time?

    Thank you!
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,025
    Why? The standard shader doesn't do anything for lightmapping.

    Yes. (or at least the simplified mobile version)
     
  3. martaaay

    martaaay

    Joined:
    Apr 13, 2009
    Posts:
    136
    The standard shader doesn't do anything for light mapping? Interesting. But if I choose something like mobile/diffuse, I won't get nice effects like emission that makes a nice glow when doing GI calculations. Is there another option, or am I just totally confused (the latter may be the case!).

    The workflow I'm considering is this: Material my static elements with standard, Lightmap, then at build time swap all standard materials to mobile/diffuse.
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,025
    If you want emission you can choose an emissive shader.
     
    UnityLighting likes this.
  5. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,793
    Only color (+ texture's color) and emissive value is important in lightmapping from shaders

    So you can use Diffuse shader for all surfaces and Legacy Shaders->Self Illuminated->Diffuse shader for emissive materials (set GI Mode to Baked)