unity_LightmapST missing

Hi,

After I updated my project from 2021.3.0 to 2021.3.9 and URP package updated from 12.1.6 to 12.1.7 and now I get shader compilation error and my materials are broken:
Shader error in 'filename': undeclared identifier 'unity_LightmapST' at /UnityProjects/project/Library/PackageCache/com.unity.render-pipelines.core@12.1.7/ShaderLibrary/MetaPass.hlsl(81) (on d3d11)

What do I do?

Anyone?

Which shader are you getting this error from?

In my shader, but there was no error before update, so the only way of fixing it that I see is downgrading. The strange thing.

The strange thing is it says that there’s error in my shader, but this line confuses me
undeclared identifier 'unity_LightmapST' at /UnityProjects/project/Library/PackageCache/com.unity.render-pipelines.core@12.1.7/ShaderLibrary/MetaPass.hlsl(81) (on d3d11)

Like, this is a package.

Is there was some API changes?

Clearing library, package cache and reimporting didn’t helped me.

By “my shader”, do you mean a custom shader? It sounds like you’re missing an include somewhere. Did you base the shader off one in URP?

Custom URP shader, yes, sorry. But why do I need to add it now?

Hard to say exactly why without knowing what’s in your shader. I would guess that a change landed in a pass file that you’re including which made it depend on something our own shader already included, but your shader didn’t. Hopefully, we’ll have a better way to do custom shaders in the future.

As for what you need to do, the undeclared identifier is declared in “com.unity.render-pipelines.universal/ShaderLibrary/UnityInput.hlsl”. But rather than directly including that one, I would recommend that you ensure that you’re including “Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl” before the pass file. That one also includes UnityInput.hlsl, as well as a bunch of stuff used in URP.