Skip to main content

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:

NameTypeDescription
directionVector3The direction of light.
colorColorThe color of light.
intensitynumberThe 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)