Version: 2022.1

LightingSettings.directionalityMode

切换到手册
public LightmapsMode directionalityMode ;

描述

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 or when using GLES2.0; 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.

See Also: Lighting Settings Asset,Directional lightmapping.