Search Unity

5.0.1 Standard Terrain Shader Fails To Compile

Discussion in 'Shaders' started by cowtrix, Apr 9, 2015.

  1. cowtrix

    cowtrix

    Joined:
    Oct 23, 2012
    Posts:
    322
    Hey guys. So the latest Standard-FirstPass terrain shader which can be downloaded here fails to compile with the following error:

    Code (CSharp):
    1. Shader error in 'Nature/Terrain/Standard': actual parameter #3 must be same type as formal out parameter ("weight") actual parameter #4 must be same type as formal out parameter ("mixedDiffuse") actual parameter #5 must be same type as formal out parameter ("mixedNormal") too many parameters in function call at line 64 (on d3d9)
    Any ideas what's happening here?
     
  2. cowtrix

    cowtrix

    Joined:
    Oct 23, 2012
    Posts:
    322
    Bump.
     
  3. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    335
    Are you using 5.0.1 editor to compile it? Because you'll need the latest .cginc files that ship with the editor.
     
  4. cowtrix

    cowtrix

    Joined:
    Oct 23, 2012
    Posts:
    322
    Hi yuanxing. Yes, I am compiling with 5.0.1f4.
     
  5. FlaSh-G

    FlaSh-G

    Joined:
    Apr 21, 2010
    Posts:
    212
    Same Problem here with 5.0.1f1.

    Looks like TERRAIN_STANDARD_SHADER is not set in the context.

    //e: Whoops, not exactly the same error. For me, it's the AddPass shader.
    //e2: Okay, I think that Unity just didn't recompile the shaders by itself after the update. Both shaders compile now.
     
    Last edited: Apr 16, 2015
  6. Therian13

    Therian13

    Joined:
    Nov 24, 2013
    Posts:
    78
    anyone else have a problem with the terrain no longer being able to paint textures since the upgrade to unity 5.0.1?