s&
newspaperAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games rocketDiscover Games
business_centerWorkshop
sports_esportsGames landscapeMaps chairModels textureMaterials apparelClothing constructionMore..
forumForum docsDocs
docsDocumentation dashboardApi Reference
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Classes
DirectionalLight
chevron_left Classes
class
DirectionalLight

Constructors

functionsDirectionalLight

Properties

data_objectShadowCascadeCountdata_objectShadowCascadeSplitRatiodata_objectSkyColordata_objectVisualizer

Methods

lockCreateSceneObjectlockDrawGizmoslockOnAwake
menu
DirectionalLight
A directional light that casts shadows, like the sun.
class Sandbox .account_tree extends Light
Sandbox.Engine

build Constructors 1

DirectionalLight ()

data_object Properties 4

ShadowCascadeCount
int
Number of cascades to split the view frustum into for the whole scene dynamic shadow. More cascades result in better shadow resolution, but adds significant rendering cost. User settings will set a maximum.
ShadowCascadeSplitRatio
float
Controls how cascades 2+ are distributed between the first cascade boundary and the far clip. 0 is uniform, 1 is fully logarithmic.
SkyColor
Color
Color of the ambient sky color This is kept for long term support, the recommended way to do this is with an Ambient Light component.
Visualizer
CascadeVisualizer

functions Methods 3

CreateSceneObject ()
SceneLight
DrawGizmos ()
OnAwake ()

Inheritance

Component
Light
DirectionalLight
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter