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

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’ to ‘Texture2DArray’ at /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.

1 Like

same issue

same here: 'SampleDirectionalLightmap': cannot implicitly convert from 'Texture2D<min16float4>' to 'Texture2D<f - Unity Engine - Unity Discussions
but here I am not using any pipeline

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