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

Shader LOD - cant find examples

Discussion in 'Shaders' started by Lune, Jan 22, 2016.

  1. Lune

    Lune

    Joined:
    Oct 20, 2012
    Posts:
    62
    Hello, im researching about shaders that use LOD, i have seen the tag before but i dont fully understand how does it works.

    I'm guessing that if the current pass is not compatible with the specified LOD then it will go to another pass? or will it use another subshader?

    thanks!
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,406
    I believe it's pretty well described here:
    http://docs.unity3d.com/Manual/SL-ShaderLOD.html

    Unity goes through the shader fallback chain to find a shader with the appropriate LOD.
     
  3. Lune

    Lune

    Joined:
    Oct 20, 2012
    Posts:
    62
    Mostly in how the LOD number is used and how can i trigger the usage of different sub shaders according to different LOD levels.

    My goal is to set up different LOD levels in quality settings and trigger different shaders with that automatically.
     
  4. Lune

    Lune

    Joined:
    Oct 20, 2012
    Posts:
    62
    So i found a solution to my question here:

    http://stackoverflow.com/questions/25210767/unity3d-shaders-level-of-detail

    it seems that you have to manually set the maximun LOD level with Shader.globalMaximumLOD where a high number in LOD means better quality and lower means a cheaper version of it, however it would be great that you could set it on the graphics quality settings profile.