Env cascade light: Difference between revisions
Jump to navigation
Jump to search

Bug:In
, Lightstyles will break when this entity exists. [todo tested in ?]
Note:It is recommended to have a
m (Pinsplash moved page Env cascade lighting to Env cascade light: moving this page to the CORRECT NAME. AAAAAAAA.) |
(updates. found a new input but i couldn't get it to work with ent_fire. maybe someone else knows,) |
||
Line 1: | Line 1: | ||
{{lang|Env cascade light}} | |||
[[File:CSM Example.jpg|thumb|CSM in Counter-Strike: Global Offensive]] | |||
{{base point multi|env_cascade_light|game1=Insurgency|game2=Black Mesa: Source|game3=Counter-Strike: Global Offensive}} | {{base point multi|env_cascade_light|game1=Insurgency|game2=Black Mesa: Source|game3=Counter-Strike: Global Offensive}} | ||
It casts an extremely accurate shadow map via the <code>tools/[[skybox]]</code> texture, acting as a real-time variation of {{ent|light_environment}}. This form of lighting is known as [http://msdn.microsoft.com/en-us/library/windows/desktop/ee416307(v=vs.85).aspx cascade shadow maps], which works by rendering very detailed shadow maps which becomes a lower and lower resolution depending on the distance the viewer is from the surface, similar to [[mipmaps]]. Some games automatically add this entity to the map, but it can be placed manually as well. | |||
It casts an extremely accurate shadow map via the | |||
{{bug|In {{insurgency}}, you must compile your map with HDR | {{bug|In {{insurgency}}, you must compile your map with [[HDR]], otherwise shadows will be very faint.}} | ||
{{bug|In {{insurgency}}, [[ | |||
{{note|It is recommended to have a | {{bug|In {{insurgency}}, [[Naming Lights|Lightstyles]] will break when this entity exists.}} | ||
{{ | |||
{{note|It is recommended to have a <code>light_environment</code> in your map as well to create [[lightmap]] based lighting, which is not done by this entity.}} | |||
{{todo|Update for Black Mesa: Source. Keyvalues etc may be missing.}} | |||
{{csgo}} Represented by class <code>CCascadeLight</code>. | |||
==Keyvalues== | ==Keyvalues== | ||
{{KV|Light Color|color255|This is the color of the sunlight.}} | {{KV|Light Color (color)|color255|This is the color of the sunlight.}} | ||
{{KV|Max shadow distance|bool|Maximum dynamic shadow distance. Higher values are slower, default on PC is 400 units.}} | {{KV|Max shadow distance (maxshadowdistance)|bool|Maximum dynamic shadow distance. Higher values are slower, default on PC is 400 units.}} | ||
{{KV|Use light_environment's angles|float|If true, the CSM shadow angles are automatically | {{KV|Use light_environment's angles (uselightenvangles)|float|If true, the CSM shadow angles are automatically taken from a {{ent|light_environment}}'s angles. If false, this entity's '''Pitch Yaw Roll''' is used.}} | ||
{{KV EnableDisable}} | {{KV EnableDisable}} | ||
{{KV | {{KV BaseEntity}} | ||
==Inputs== | ==Inputs== | ||
{{ | {{IO|SetAngles|Sets the direction shadows cast in.|param=string}} | ||
{{IO|LightColor|Changes color of the sunlight.|param=color255}} | |||
{{IO|LightColorScale|nofgd=1|{{todo|Unknown.}}}} | |||
{{I EnableDisable}} | {{I EnableDisable}} | ||
{{ | {{I BaseEntity}} | ||
{{ | |||
==Outputs== | |||
{{O BaseEntity}} | |||
[[Category:Lighting]] | |||
Revision as of 08:59, 23 September 2018


It casts an extremely accurate shadow map via the tools/skybox
texture, acting as a real-time variation of light_environment. This form of lighting is known as cascade shadow maps, which works by rendering very detailed shadow maps which becomes a lower and lower resolution depending on the distance the viewer is from the surface, similar to mipmaps. Some games automatically add this entity to the map, but it can be placed manually as well.



light_environment
in your map as well to create lightmap based lighting, which is not done by this entity.Todo: Update for Black Mesa: Source. Keyvalues etc may be missing.
Represented by class
CCascadeLight
.
Keyvalues
- Max shadow distance (maxshadowdistance) ([todo internal name (i)]) <boolean>
- Maximum dynamic shadow distance. Higher values are slower, default on PC is 400 units.
- Use light_environment's angles (uselightenvangles) ([todo internal name (i)]) <float>
- If true, the CSM shadow angles are automatically taken from a light_environment's angles. If false, this entity's Pitch Yaw Roll is used.
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with the
Enable
input).
Inputs
- SetAngles <string >
- Sets the direction shadows cast in.
- LightColor <color255 >
- Changes color of the sunlight.
- LightColorScale !FGD
- Todo: Unknown.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.