Search Unity

modify default pbr shaders:

Discussion in 'Shaders' started by ghiboz, Mar 30, 2015.

  1. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi all!
    I need to have at least 6 texture uv in my shader, i'm trying to modify the default shaders: In UnityStandardInput.cginc I've modified VertexInput like this:

    Code (CSharp):
    1. struct VertexInput
    2. {
    3.     float4 vertex    : POSITION;
    4.     fixed4 vColor    : COLOR;
    5.     half3 normal    : NORMAL;
    6.     float2 uv0        : TEXCOORD0;
    7.     float2 uv1        : TEXCOORD1;
    8.     float2 uv2        : TEXCOORD2;
    9.     float2 uv3        : TEXCOORD3;
    10.     float2 uv4        : TEXCOORD4;
    11.     //float2 uv5        : TEXCOORD5;
    12. #ifdef _TANGENT_TO_WORLD
    13.     half4 tangent    : TANGENT;
    14. #endif
    15. };
    but when the shader compile, gives me this error:

    any ideas?
    my shader may accept uv from 0 to 5, but maybe that in the mesh there's only 2 uv per vertex...

    thanks in advance!

    p.s. at the moment the UnityStandardCore.cginc is not modified..
     
    Martian-Games and huemanru2 like this.
  2. VLukianenko

    VLukianenko

    Joined:
    Mar 27, 2017
    Posts:
    30