Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Shader error in 'MC/Toon': profile specifier "nointerpolation" not allowed on non-function (978790)

Discussion in '2017.3 Beta' started by laurentlavigne, Dec 14, 2017.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    So I do this, which works in CG and instead of a deadly error I get something informative but I can't figure out if it's saying that nointerpolation is now accepted as a way to flatten polygons or if it's just some generic message.
    So if nointerpolation is now part of surface shader, how do we use it?

    Code (CSharp):
    1.         struct Input
    2.         {
    3.             float2 uv_texcoord;
    4.             nointerpolation float3 worldNormal;
    5.             INTERNAL_DATA
    6.             float3 worldPos;
    7.         };
    8.  
    9.         struct SurfaceOutputCustomLightingCustom
    10.         {
    11.             nointerpolation fixed3 Albedo;
    12.             nointerpolation fixed3 Normal;
    13.             half3 Emission;
    14.             half Metallic;
    15.             half Smoothness;
    16.             half Occlusion;
    17.             fixed Alpha;
    18.             Input SurfInput;
    19.             UnityGIInput GIData;
    20.         };
    spits out

    Code (CSharp):
    1.  
    2. Shader error in 'MC/Toon': profile specifier "nointerpolation" not allowed on non-function "worldNormal" at line 60 (on d3d9)
    3.