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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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


    Aug 16, 2012
    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.         };
    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):
    2. Shader error in 'MC/Toon': profile specifier "nointerpolation" not allowed on non-function "worldNormal" at line 60 (on d3d9)