Search Unity

Shader Error 2018.1.1f1 - standard shaders

Discussion in 'Shaders' started by kavanavak, May 20, 2018.

  1. kavanavak

    kavanavak

    Joined:
    Sep 30, 2015
    Posts:
    54
    I'm getting an shader error on blank projects, using standard shaders from unity. Not sure why.

    Using 2018.1.1f1
    - download builtin_shaders-2018.1.1f1
    - create a new project, 3d, defaults.
    - drag in "Standard.shader" into the project from \DefaultResourcesExtra\


    ERROR
    Shader error in 'Standard': invalid subscript 'uv2' at /Program Files/Unity/Hub/Editor/2018.1.1f1/Editor/Data/CGIncludes/UnityStandardMeta.cginc(21) (on d3d11)

    Compiling Vertex program
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
     
  2. kavanavak

    kavanavak

    Joined:
    Sep 30, 2015
    Posts:
    54
    hmm.. might be a naming issue..
     
  3. kavanavak

    kavanavak

    Joined:
    Sep 30, 2015
    Posts:
    54
    Yeah it was a naming issue, the script was throwing an error because it was seen as a duplicate, changing the name (file and internally) fixed the issue ..

    Feel free to delete, or leave as cautionary tale
     
  4. TruAmbition

    TruAmbition

    Joined:
    Feb 25, 2018
    Posts:
    4
    I'm running into the same issue, can you provide a bit more detail as to how you rectified this? I deleted the actual file but the error persisted.


    Thanks,
     
  5. kavanavak

    kavanavak

    Joined:
    Sep 30, 2015
    Posts:
    54
    If I remember correctly @TruAmbition (sorry for the delay) I opened the shader and changed the name:
    Shader "Custom/[shaderName]"
    ..then changed the file name itself from Standard to [shaderName]

    deleting the shader should fix the issue (if it was the same issue) since for me it was a conflict with the already internally built standard shader
     
    TruAmbition likes this.
  6. wangcheng2pathea

    wangcheng2pathea

    Joined:
    Jan 20, 2020
    Posts:
    3
    I had this issue resolved by reimporting the shader.