Use bicubic sampling to improve the visual fidelity of lightmaps.
Bicubic sampling smooths sharp or jagged edges in your lightmap to improve its visual fidelity. Bicubic sampling is helpful for low resolution lightmaps and shadows. However, it performs more texture sampling so it introduces additional performance overhead on lower-end platforms.
| Feature name | Universal Render Pipeline (URP) | High Definition Render Pipeline (HDRP) | Custom SRP | Built-in Render Pipeline |
|---|---|---|---|---|
| Bicubic Lightmap Sampling | Yes | Yes | No | No |
To use bicubic sampling in your project, enable the Use Bicubic Lightmap Sampling property in URP graphics settings or HDRP graphics settings.
Bicubic sampling can cause texture bleeding, where Unity samples unintended texels from neighboring regions of a texture, leading to visual artifacts. To prevent texture bleeding, there needs to be enough margin between lightmap UV charts. To fully remove texture bleeding artifacts, set the number of texels between each UV chart to at least 2 for bilinear filtering and at least 4 for bicubic filtering.
To change the margin between charts, refer to Fix light bleeding in lightmaps.