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:You still need to have a
No edit summary |
Deprecated (talk | contribs) (Added Black Mesa keyvalues and inputs) |
||
Line 1: | Line 1: | ||
{{lang|Env cascade light}} | {{lang|Env cascade light}} | ||
[[File:CSM Example.jpg|thumb|CSM in Counter-Strike: Global Offensive]] | [[File:CSM Example.jpg|thumb|CSM in Counter-Strike: Global Offensive]] | ||
{{base point multi|env_cascade_light|game1=Insurgency|game2=Black Mesa | {{base point multi|env_cascade_light|game1=Insurgency|game2=Black Mesa|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 <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. | ||
{{bug|In {{insurgency}}, you must compile your map with [[HDR]], otherwise shadows will be very faint.}} | {{bug|In {{insurgency}}, you must compile your map with [[HDR]], otherwise shadows will be very faint.}} | ||
{{bug|In {{insurgency}}, [[Naming Lights|Lightstyles]] will break when this entity exists.}} | {{bug|In {{insurgency}}, [[Naming Lights|Lightstyles]] will break when this entity exists.}} | ||
{{note|You still need to have a <code>light_environment</code> in your map as well to create [[lightmap]] based lighting, which is not done by this entity.}} | {{note|You still need to have a <code>light_environment</code> in your map as well to create [[lightmap]] based lighting, which is not done by this entity.}} | ||
{{csgo}} Represented by class <code>CCascadeLight</code>. | {{csgo}} Represented by class <code>CCascadeLight</code>. | ||
Line 19: | Line 16: | ||
{{KV|Max shadow distance (maxshadowdistance)|float|Maximum dynamic shadow distance. Higher values are slower, default on PC is 400 units.}} | {{KV|Max shadow distance (maxshadowdistance)|float|Maximum dynamic shadow distance. Higher values are slower, default on PC is 400 units.}} | ||
{{KV|Use light_environment's angles (uselightenvangles)|bool|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|Use light_environment's angles (uselightenvangles)|bool|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|LightRadius1|to=LightRadius3|float|Used for controlling shadow softness in cascades 1, 2, and 3.|only=BMS}} | |||
{{KV|Depthbias1|to=Depthbias3|float|DepthBias for cascades 1, 2, and 3.|only=BMS}} | |||
{{KV|Slopescaledepthbias1|to=Slopescaledepthbias3|float|Slope DepthBias for cascades 1, 2, and 3.|only=BMS}} | |||
{{KV|ViewModelDepthbias|float|DepthBias for viewmodel cascade.|only=BMS}} | |||
{{KV|ViewModelSlopescaledepthbias|float|DepthBias for viewmodel cascade.|only=BMS}} | |||
{{KV|CSM_Volume_Mode (CSMVolumeMode)|choices|Use Manual mode for better quality and performance. In near future Auto mode will be removed from the game.|only=BMS}} | |||
:*0: Auto: Static cache will update once every 10 frames (approx) covering max shadow distance or whole map around player. | |||
:*1: Manual : Static cache area coverage and updates are managed via CSM Volumes' I/O. | |||
{{KV EnableDisable}} | {{KV EnableDisable}} | ||
{{KV BaseEntity}} | {{KV BaseEntity}} | ||
Line 26: | Line 31: | ||
{{IO|LightColor|Changes color of the sunlight.|param=color255}} | {{IO|LightColor|Changes color of the sunlight.|param=color255}} | ||
{{IO|LightColorScale|Boosts the color of the sunlight. Non-functional, only resets the Light Color.|nofgd=1|deprecated=1}} | {{IO|LightColorScale|Boosts the color of the sunlight. Non-functional, only resets the Light Color.|nofgd=1|deprecated=1}} | ||
{{IO|SetCSMVolume|Set CSM Volume via trigger volume.|only=BMS}} | |||
{{IO|SetCSMVolumeToSceneBounds|Set CSM Volume to scene bounds.|only=BMS}} | |||
{{IO|SetCSMVolumeViaCSMVolumeEntity|param=targetname|Set CSM Volume to CSM Volume Entity.|only=BMS}} | |||
{{I EnableDisable}} | {{I EnableDisable}} | ||
{{I BaseEntity}} | {{I BaseEntity}} |
Revision as of 11:27, 25 May 2019


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. Represented by class
CCascadeLight
.
Keyvalues
- Light Color (color) ([todo internal name (i)]) <color255>
- This is the color of the sunlight. For CSGO, the color is automatically copied from the light_environment.
- Max shadow distance (maxshadowdistance) ([todo internal name (i)]) <float>
- Maximum dynamic shadow distance. Higher values are slower, default on PC is 400 units.
- Use light_environment's angles (uselightenvangles) ([todo internal name (i)]) <boolean>
- 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.
- LightRadius1 ([todo internal name (i)]) to LightRadius3 <float> (only in
)
- Used for controlling shadow softness in cascades 1, 2, and 3.
- Depthbias1 ([todo internal name (i)]) to Depthbias3 <float> (only in
)
- DepthBias for cascades 1, 2, and 3.
- Slopescaledepthbias1 ([todo internal name (i)]) to Slopescaledepthbias3 <float> (only in
)
- Slope DepthBias for cascades 1, 2, and 3.
- ViewModelSlopescaledepthbias ([todo internal name (i)]) <float> (only in
)
- DepthBias for viewmodel cascade.
- CSM_Volume_Mode (CSMVolumeMode) ([todo internal name (i)]) <choices> (only in
)
- Use Manual mode for better quality and performance. In near future Auto mode will be removed from the game.
- 0: Auto: Static cache will update once every 10 frames (approx) covering max shadow distance or whole map around player.
- 1: Manual : Static cache area coverage and updates are managed via CSM Volumes' I/O.
- 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- Deprecated.
Boosts the color of the sunlight. Non-functional, only resets the Light Color.
- SetCSMVolumeViaCSMVolumeEntity <targetname > (only in
)
- Set CSM Volume to CSM Volume Entity.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.