Open Asterune
Lighting

Lighting

Controls global lighting, time of day, ambient light, shadows, and fog.

Service
game:GetService("Lighting")
Inherits
Instance
Replication
Never

Behavior

Lighting configures lighting and fog for the entire place. Local lights are configured with PointLight, SpotLight, and SurfaceLight. Parent a Sky to this service to configure the sky.

Summary

Members28
Properties25
Methods3

Properties

AdaptationSpeed

Lighting.AdaptationSpeed: number = 1.5

The rate at which automatic exposure approaches the target exposure.

Ambient

Lighting.Ambient: Color3 = Color3.new(0.4, 0.4, 0.4)

The ambient light color applied to surfaces not directly lit by the sun.

AmbientBrightness

Lighting.AmbientBrightness: number = 1

The multiplier applied to ambient illumination.

Brightness

Lighting.Brightness: number = 1

The intensity multiplier for directional sunlight and moonlight. It does not change ambient light.

ClockTime

Lighting.ClockTime: number

The time of day, in hours, clamped to the inclusive range 0–24. A value of 12 represents noon. Non-finite assignments are ignored.

ColorShift_Bottom

Lighting.ColorShift_Bottom: Color3 = Color3.new(0, 0, 0)

The color shift applied to downward-facing surfaces.

ColorShift_Top

Lighting.ColorShift_Top: Color3 = Color3.new(0, 0, 0)

The color shift applied to upward-facing surfaces.

EnvironmentDiffuseScale

Lighting.EnvironmentDiffuseScale: number = 1

The multiplier applied to diffuse environment lighting.

EnvironmentSpecularScale

Lighting.EnvironmentSpecularScale: number = 1

The multiplier applied to specular environment reflections.

ExposureCompensation

Lighting.ExposureCompensation: number = 0

The exposure adjustment in stops, clamped to -5 through 5. Non-finite assignments are ignored.

ExposureMode

Whether exposure is manually configured or adapted from scene luminance.

FogColor

Lighting.FogColor: Color3

The color used for fog.

FogEnd

Lighting.FogEnd: number

The distance from the camera, in studs, at which fog fully obscures rendered geometry. Fog blends linearly between FogStart and FogEnd.

FogStart

Lighting.FogStart: number

The distance from the camera, in studs, at which fog begins affecting rendered geometry.

GeographicLatitude

Lighting.GeographicLatitude: number

The latitude used for sun positioning, in degrees. Assignments are clamped to -90 through 90. Non-finite assignments are ignored.

GlobalShadows

Lighting.GlobalShadows: boolean = false

Whether directional lighting casts shadows. Enabling shadows adds rendering work.

MaxExposure

Lighting.MaxExposure: number = 2

The upper exposure bound used by automatic exposure.

MinExposure

Lighting.MinExposure: number = -2

The lower exposure bound used by automatic exposure.

OutdoorAmbient

Lighting.OutdoorAmbient: Color3 = Color3.new(0.5, 0.5, 0.5)

The ambient light color applied to surfaces exposed to the sky.

Outlines

Lighting.Outlines: boolean = true

Whether parts render with black outlines.

PrioritizeLightingQuality

Lighting.PrioritizeLightingQuality: boolean = false

Whether the renderer favors lighting quality when allocating lighting resources.

ShadowColor

Lighting.ShadowColor: Color3 = Color3.new(0.7, 0.7, 0.72)

The color used to tint shadowed surfaces.

ShadowSoftness

Lighting.ShadowSoftness: number = 0.5

The softness of shadow edges. A value of 0 produces hard edges.

Style

The global lighting style.

Tonemapper

The operator used to map scene lighting to display color.

Methods

GetExecutionGroup

Lighting:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

GetMoonDirection

Lighting:GetMoonDirection(): Vector3

Returns the moon direction in world space.

GetSunDirection

Lighting:GetSunDirection(): Vector3

Returns the sun direction in world space.

Inherited members

Inherited47

Example

Luau
local Lighting = game:GetService("Lighting")
Lighting.ClockTime = 14

PointLight · Color3 · Sky