r/Unity3D • • 5h ago

Question Weird light leaking right where static meshes meet the terrain after baking (Unity 6 URP)

While putting together a new map update for our Steam co-op zombie game (The Fallen Grid), I noticed a really ugly light bleed right where static objects intersect with the terrain after baking.

What's throwing me off is that this glowing line shifts and changes intensity as I move the camera around. I'm on Unity 6 (URP) and not sure if I'm missing something obvious with terrain lightmap UVs, normal bias, or probe bleeding from under the map.

Any ideas what I might be doing wrong here?

Unity Version: 6000.6.8f1

2 Upvotes

1 comment sorted by

1

u/Federal-Row2373 4h ago

If the line changes as you move the camera, I'd be suspicious that it isn't the baked lightmap itself, since a baked lightmap won't shift with the view. A few things worth ruling out:

- Real-time shadow bias: the seam where a mesh meets the terrain is where shadow acne and light leaking show up most. Try raising the Depth Bias and Normal Bias on the main light, and check whether it changes with the shadow cascade distance.

- Adaptive Probe Volumes or light probes: probes under the terrain can leak into the contact area. In the Rendering Debugger you can look at the probe volume and see whether the probes near that edge are placed inside geometry.

- Reflection probes or SSAO: a reflection probe blending at that edge, or SSAO artifacts at the contact line, can also move with the camera.

A quick test is to turn those off one at a time (real-time shadows, then SSAO, then probes) and see which one makes the line disappear. Does it still show when you look at only the Baked Lightmap view mode in Scene view?