文档

Unity Engine

Unity Engine

fogDensity

The density of the exponential fog.
阅读时间1 分钟最后更新于 1 天前

Definition

public static float fogDensity { get; set; }

Remarks

Fog density is used by FogMode.Exponential and FogMode.ExponentialSquared modes.
using UnityEngine;using System.Collections;public class ExampleClass : MonoBehaviour{ void Example() { // Set the fog density RenderSettings.fogDensity = 0.1f; // And enable fog RenderSettings.fog = true; }}
Additional Resources: RenderSettings.fogMode.