Search Unity

LOD Group Cross-fading duration?

Discussion in 'Shaders' started by Dobalina, Mar 10, 2020.

  1. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    105
    Apologies if this is the wrong section, I just know LOD cross fades are utilized by shaders. I'm wondering if anyone might know how I can alter the duration at which a LOD cross fade occurs. By default it seems to crossfade by a quarter second or so. I'm wanting to stretch the cross fade closer to a couple of seconds.
    upload_2020-3-9_23-43-23.png
     
  2. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,266
    If you disable the checkbox, a field will pop up that allows you to set the transition duration. Though in my experience, it's not always available, perhaps it was removed in newer Unity versions for some reason.
     
  3. thebarryman

    thebarryman

    Joined:
    Nov 22, 2012
    Posts:
    130
    It can be set through code -

    LODGroup.crossFadeAnimationDuration = value;