Version: 2023.2
LanguageEnglish
  • C#

LightingSettings.lightmapPadding

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public int lightmapPadding;

Description

Sets the distance (in texels) between separate UV tiles in lightmaps. (Editor only).

The range is 2 to 100. The default value is 2.

This setting can be useful when scaling lightmaps down to support lower-end hardware, which can lead to bilinear filtering issues between neighbouring object's tiles. Adjust this setting to increase the space between tiles, and avoid this issue. Note that adjusting this setting does not affect bilinear filtering within the tile itself.

This setting affects lightmaps generated by the Baked Global Illumination system.

When Unity serializes this LightingSettings object as a Lighting Settings Asset, this property corresponds to the Lightmap Padding property in the Lighting Settings Asset Inspector.

Additional resources: Lighting Settings Asset.