Skip to content

Api > SphericalHarmonicsL2 > AddDirectionalLight()


SphericalHarmonicsL2.AddDirectionalLight(Vector3 direction, Color color, number intensity)⚓︎

Add directional light to probe data. If SH probe is used to calculate lighting, this function has the effect of adding directional light into probe data.

Parameters:⚓︎

Name Type Description
direction Vector3 The direction of light.
color Color The color of light.
intensity number The intensity of the light.

Usage⚓︎

---@type SphericalHarmonicsL2
local sphericalharmonicsl2;

---@type Vector3
local direction;

---@type Color
local color;

---@type number
local intensity;


sphericalharmonicsl2.AddDirectionalLight(direction, color, intensity)