Search Unity

Question Shader Level Of Details In Shader Graph

Discussion in 'Shader Graph' started by mdm2233, Mar 13, 2020.

  1. mdm2233

    mdm2233

    Joined:
    May 9, 2018
    Posts:
    10
    I just wanna know how can I create a shader lod in Shader Graph . Because I can do it in original shader file easily by adding a subshader.So What do I need to do?
     
  2. Elizabeth_LeGros

    Elizabeth_LeGros

    Unity Technologies

    Joined:
    Jan 7, 2020
    Posts:
    50
    If you mean the Shaderlab syntax of giving a subshader a LOD value (or even explicitly creating subshaders in the graph), that does not currently exist in Shader Graph. You can handle your own shader complexity by using keywords to control more expensive parts of the shader or make sure LODGroups are used on renderers to have better control of when more expensive shaders are used in a project.
     
  3. mdm2233

    mdm2233

    Joined:
    May 9, 2018
    Posts:
    10
    alright then. I got another few questions. can I get cull mode property from material with Shader Graph? or I need to duplicate a Shader Graph for different Cull mode property? (same question with Blend Option property) and if so,are these two shader graph compiled to just one shader because they exactly have the same vertex and pixel shaders.
     
    laurentlavigne likes this.
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    bump
    and how do i set the material quality at runtime? what's the cost of that? (as cheap as LOD is my guess)