This article's documentation is for anything that uses the Source engine. Click here for more information.

Light directional: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
m (intn)
Line 6: Line 6:
== Keyvalues ==
== Keyvalues ==


{{KV|Pitch (pitch)|integer|The downward pitch of the light from the sun. 0 is horizontal, -90 is straight down.}}
{{KV|Pitch|intn=pitch|integer|The downward pitch of the light from the sun. 0 is horizontal, -90 is straight down.}}
{{KV|Brightness (_light)|color255 + int|The RGB color and brightness of the light. Colors must be between 0 and 255; brightness can be anything.}}
{{KV|Brightness|intn=_light|color255 + int|The RGB color and brightness of the light. Colors must be between 0 and 255; brightness can be anything.}}
{{KV|BrightnessHDR (_lightHDR)|color255 + int|Brightness override used in HDR mode. Default is <code>-1 -1 -1 1</code>, which means no change.  
{{KV|BrightnessHDR|intn=_lightHDR|color255 + int|Brightness override used in HDR mode. Default is <code>-1 -1 -1 1</code>, which means no change.  
:{{warning|The fourth digit must be positive. Otherwise all light will be sucked out of your map!}}}}
:{{warning|The fourth digit must be positive. Otherwise all light will be sucked out of your map!}}}}
{{KV|BrightnessScaleHDR (_lightHDRscale)|float|Amount to scale the light by when compiling for HDR.}}
{{KV|BrightnessScaleHDR|intn=_lightHDRscale|float|Amount to scale the light by when compiling for HDR.}}
{{KV|SpreadAngle (SunSpreadAngle)|float|The angular extent of the light for casting soft shadows. Higher numbers are more diffuse. 5 is a good starting value.}}
{{KV|SpreadAngle|intn=SunSpreadAngle|float|The angular extent of the light for casting soft shadows. Higher numbers are more diffuse. 5 is a good starting value.}}
{{KV Angles}}
{{KV Angles}}



Revision as of 01:39, 26 July 2024

light_directional is an internal point entity available in all Source Source games since Left 4 Dead Left 4 Dead.(also in Slammin' Source Map Tools Slammin' Source Map Tools) It is a directional light with no falloff, similar to the direct lighting of light_environment.

Note.pngNote:As with a light_environment, a light_directional is only emitted from geometry covered with the skybox tool texture.
Icon-Bug.pngBug:Counter-Strike: Global Offensive In Counter-Strike: Global Offensive, after the Wildfire update, this entity does not seem to be working properly or has to be set differently. It can create excessively dark shadows tinged with the color of the light_environment ambient color plus the setting of the light_directional. It appears to boost these colors tremendously now.  [todo tested in ?]

Keyvalues

Pitch (pitch) <integer>
The downward pitch of the light from the sun. 0 is horizontal, -90 is straight down.
Brightness (_light) <color255 + int>
The RGB color and brightness of the light. Colors must be between 0 and 255; brightness can be anything.
BrightnessHDR (_lightHDR) <color255 + int>
Brightness override used in HDR mode. Default is -1 -1 -1 1, which means no change.
Warning.pngWarning:The fourth digit must be positive. Otherwise all light will be sucked out of your map!
BrightnessScaleHDR (_lightHDRscale) <float>
Amount to scale the light by when compiling for HDR.
SpreadAngle (SunSpreadAngle) <float>
The angular extent of the light for casting soft shadows. Higher numbers are more diffuse. 5 is a good starting value.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

See also