Search Issue Tracker
Fixed in 2021.2.X
[URP] [HDRP] Instanced terrain is not visible in Baked Lightmap scene debug view
1) Create new URP (or HDRP) project.
2) Add terrain.
3) Bake (you can reduce resolution for faster bake times).
4) When bake is complete, select the "Baked Lightmap" debug visualization. You should see the lightmap data.
5) Go to the terrain's settings and enable "Draw Instanced". At this point the lightmap data disappears (only wireframe remains).
Expected: The lightmap data is shown even if I enable "Draw Instanced".
Actual: It is not shown.
In projects using Builtin/Legacy renderer, this works fine. It only appears in URP/HDRP. It seems this was even an issue when instanced terrain drawing was introduced in 2018.3 (tested with 2018.3.6f1).
This issue is probably related to https://fogbugz.unity3d.com/f/cases/1082011/. I guess that the fix for 1082011 solved the problem for Builtin/Legacy but did not look at URP/HDRP (but this needs verification).
****************** Old repro steps ******************
Steps to reproduce:
1. Download and open FontaineBleu project (link in the comments)
2. Navigate to Lighting Settings
3. Bake the lighting
4. While the lighting is baking (or has finished), switch to Baked Lightmap scene view mode
5. Notice that terrain is not visible
- Does not affect built-in RP and URP
- Does not reproduce in template projects with a flat terrain added to them
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [HDRP] Decal Projector with layer mask "nothing" doesn't affect transparent objects when Decal Layers are disabled in frame settings
- "MonoBehaviour.OnApplicationQuit" is still called when quitting is canceled by “Application.wantsToQuit“ returning false
- [2D SG/VFX] Surface options are not shown in Output Inspector when 2D Sprite SG is assigned to VFX
- Collisions are incorrectly registered when setting a joint motor every frame causes
- Terrain shadows flicker while moving the Camera in the Player when Terrain contains GPU instanced materials
Resolution Note (fix version 2021.2):
Baked Lightmap debug view is not yet supported with SRPs. Will revisit this once general support for this with SRPs has been added.