Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shader warning in 'MyDiffuse': Infinite fallbacks: MyDiffuse->Diffuse->Diffuse

Discussion in 'Shaders' started by zwcloud, Aug 23, 2020.

  1. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    377
    What's the possible cause of this?

    Unity 2019.1.12, builtin render-pipeline

    Code (CSharp):
    1. Shader "MyDiffuse"{
    2. SubShader {
    3.     Tags { "RenderType" = "Opaque" }
    4.     CGPROGRAM
    5.     #pragma surface surf Lambert
    6.     struct Input {
    7.         float4 color : COLOR;
    8.     };
    9.     void surf (Input IN, inout SurfaceOutput o) {
    10.         o.Albedo = 1;
    11.     }
    12.     ENDCG
    13. }
    14.     Fallback "Diffuse"
    15. }
    16.  
    upload_2020-8-23_18-19-42.png
     
    Last edited: Aug 23, 2020