Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

LightingSettings.directionalityMode

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 LightmapsMode directionalityMode;

Description

Determines whether the lightmapper should generate directional or non-directional lightmaps. (Editor only).

When this is set to Directional, Unity generates an additional lightmap that encodes a vector for the dominant direction of incoming light at each texel’s position. When this is set to Non-Directional, Unity does not generate these additional lightmaps.

The use of directional lightmaps can improve the rendering of normal mapped materials, but at the cost of increased storage and memory.

Directional lightmaps cannot be decoded on SM2.0 hardware; in these cases, Unity falls back to using non-directional lightmaps.

This property determines whether the next bake will produce directional or non-directional lightmaps. You can access whether the previous bake produced directional or non-directional lightmaps using the LightmapSettings.lightmapsMode property.

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 Directional Mode property in the Lighting Settings Asset Inspector.

Additional resources: Lighting Settings Asset,Directional lightmapping.