Skip to main content
Version: 0.11.0

UeLightShadow

UeLightShadow is the base class for light shadow controllers in Unique Engine. It provides common properties and helper methods shared by directional and point light shadows.

This class is typically not instantiated directly but serves as a foundation for specific shadow implementations like UeDirectionalLightShadow and UePointLightShadow.


Constructor​

new UeLightShadow(data = {})

Parameters​

ParameterTypeDefaultDescription
datastruct{}Configuration object for shadow properties

Data Properties​

PropertyTypeDefaultDescription
mapWidthnumber1024Shadow map width in pixels
mapHeightnumber1024Shadow map height in pixels

Properties​

PropertyTypeDefaultDescription
mapSizestruct{width: 1024, height: 1024}Shadow map dimensions

Usage​

This class is used internally by specific light shadow implementations:

  • UeDirectionalLightShadow - For directional lights using orthographic shadow cameras
  • UePointLightShadow - For point lights using cube shadow maps (6 faces)

Example of accessing shadow properties:

const dirLight = new UeDirectionalLight(c_white, 1);
dirLight.castShadow = true;

// Update shadow map resolution
dirLight.shadow.updateMapSize(2048, 2048);