Search Unity

Error in shader compilation when building: HDRP/Lit: SampleDirectionalLightmap can't convert type

Discussion in 'High Definition Render Pipeline' started by TieSKey, Jun 20, 2022.

  1. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    225
    Whenever I try to build my game (unity 2021.3.4f1 standalone-windows-mono-vulkan) I get the following errors on several (but not all) shaders:

    Shader error in 'HDRP/Lit': 'SampleDirectionalLightmap': cannot implicitly convert from 'Texture2D<float4>' to 'Texture2DArray<float4>' at <MyGameFolder>/Library/PackageCache/com.unity.render-pipelines.high-definition@12.1.7/Runtime/Material/BuiltinGIUtilities.hlsl(88) (on d3d11)

    (Why does it even say d3d11 when the only graphics api is vulkan ¯\_(ツ)_/¯

    So I've tried reimporting packages, deleting entire Library folder, opening and re-saving my own shader graphs (not that would affect the default HDRP/Lit one...)

    The game works just fine in the editor.

    Any ideas/suggestions/hits?

    Thx in advance.
     
    bisewski likes this.
  2. akhileshrao

    akhileshrao

    Joined:
    Oct 11, 2020
    Posts:
    6
    same issue
     
  3. bisewski

    bisewski

    Joined:
    Jan 16, 2014
    Posts:
    309
  4. bisewski

    bisewski

    Joined:
    Jan 16, 2014
    Posts:
    309


    Hi! Did you solve this error? I am sttuck here.