HDRP Terrain details meshes lighting problem

Hello guys,

I am working with HDRP 12.1.5 and using the Terrain tool, I am using the “Paint details” tool to place various prefabs such a grass and rocks. I have a problem where the prefabs placed on the terrain with the paint detail tool seems to receive no lighting/shadows. The terrain itself receive shadows, but not the detail meshes.

Here I made a prefab with basic white boxes, those with the correct lighting were placed by hand, those with the broken lighthing are placed with the terrain details tool. It is very clear there’s a problem when you compare them:

The terrain settings:

Enable contact shadows and turn it on.
You have to enable it in a few places (as usual with HDRP)
enable in active HDRP asset, Directional light, post processing global volume

default distance is 50, you can increase it and mess with the other settings

Also try disabling light layers in your HDRP asset. There used to be a bug that messed up detail visuals when light layers were enabled. It’s fixed in some version but not sure if yours was one of them or not.

1 Like

Thank you! The problem was indeed coming from the light layers, fixed as soon as I disabled them.

in case anyone else stumbles on this.
The light layer bug is fixed from HDRP 14.0.3 ( 2022.1+) only.
Great catch as always @PutridEx :smile: