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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Shader error for Terrain Lit (Base Pass) in URP

Discussion in 'Universal Render Pipeline' started by Reshima, Mar 20, 2020.

  1. Reshima

    Reshima

    Joined:
    Dec 10, 2012
    Posts:
    51
    Whenever I bake the light map of my scene, I get this error:

    Code (CSharp):
    1. Shader error in 'Hidden/Universal Render Pipeline/Terrain/Lit (Base Pass)': unrecognized identifier 'Varyings' at /Users/renat/Documents/Unity/void-caravan/Library/PackageCache/com.unity.render-pipelines.universal@7.1.8/Shaders/Terrain/TerrainLitMetaPass.hlsl(6) (on d3d11)
    2.  
    3. Compiling Vertex program with UNITY_PASS_META _ALPHATEST_ON
    4. Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING
    Any idea what could be?
     
  2. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    158
    Hey,
    I believe this was an error in previous URP versions. Have you tried updating to URP 7.2.1?
     
  3. Reshima

    Reshima

    Joined:
    Dec 10, 2012
    Posts:
    51
    That was it! Thanks Elvar.
     
    Elvar_Orn likes this.
  4. djgriff

    djgriff

    Joined:
    May 29, 2014
    Posts:
    279
    Hi I am using Unity 2019.3.4f1 and I can't see the update for URP7.2.1 and getting the same error? How do I get the updated URP?

    Thanks

    Daniel
     
  5. oen432

    oen432

    Joined:
    Apr 24, 2015
    Posts:
    40
    Go to Package Manger, find Universal Render Pipeline, expand it (by pressing on arrow icon) and select 7.3.1 (or whatever version it's there), then you can update.
     
  6. reelie

    reelie

    Joined:
    Apr 25, 2017
    Posts:
    9
    It seems I am getting the same problem than @djgriff . When I'm doing these indications, I'm getting only the versions 7.1.6, 7.1.7 and 7.1.8, as we can see in the linked picture.

    Anything I could be doing wrong? :(
     

    Attached Files:

  7. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    374
    If you don't see it, maybe you have to open the "advanced" list and select that you want to see preview packages also.