Light directional: Difference between revisions
Jump to navigation
Jump to search
Note:As with a
Bug:
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
AltNames:light, light_spot, light_glspot, and (in all games since
) light_directional are all tied to the same C++ class in game, and only differ in VRAD.
Code:See the
Alien Swarm Reactive Drop source code for reference implementation of light_directional in VRAD.
mNo edit summary |
SirYodaJedi (talk | contribs) (Don't put link for cD template, as src13 doesn't have it) |
||
Line 1: | Line 1: | ||
{{CD|CLight|file1=lights.cpp}} | {{CD|CLight|file1=lights.cpp|nolink=1}} | ||
{{this is a|point entity|internal=1|name=light_directional|since=Left 4 Dead}}{{also|{{slamminsrc|4.1}}}} It is a directional light with no falloff, similar to the direct lighting of {{ent|light_environment}}. The main difference between this and <code>light_environment</code> is that multiple of these can be used in a single map and all of them will cause light to be emitted from sky brushes based on each of their settings. | {{this is a|point entity|internal=1|name=light_directional|since=Left 4 Dead}}{{also|{{slamminsrc|4.1}}}} It is a directional light with no falloff, similar to the direct lighting of {{ent|light_environment}}. The main difference between this and <code>light_environment</code> is that multiple of these can be used in a single map and all of them will cause light to be emitted from sky brushes based on each of their settings. | ||
Revision as of 08:15, 13 September 2024
![]() |
---|
CLight |
![]() |
light_directional
is an internal point entity available in all Source games since
Left 4 Dead.(also in
Slammin' Source Map Tools) It is a directional light with no falloff, similar to the direct lighting of light_environment. The main difference between this and
light_environment
is that multiple of these can be used in a single map and all of them will cause light to be emitted from sky brushes based on each of their settings.

light_environment
, a light_directional
is only emitted from geometry covered with the skybox tool texture.

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.
- 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.
Internal keyvalues used only by VRAD:
- 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: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.