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
Note:Older games like
don't have this entity, but there is an attempt of porting it.
Note:You alternatively can implement Biohazards deferred lighting here is a port for
Source 2013 Multiplayer as originally it was made for
Alien Swarm.
MyGamepedia (talk | contribs) mNo edit summary |
(added note for biohazards deffered lighting also it would be nice if someone made a tutorial on it) |
||
Line 14: | Line 14: | ||
{{note|Older games like {{hl2}} don't have this entity, but there is an [https://github.com/celisej567/Fake-CSM-Source-2013 attempt] of porting it.}} | {{note|Older games like {{hl2}} don't have this entity, but there is an [https://github.com/celisej567/Fake-CSM-Source-2013 attempt] of porting it.}} | ||
{{note|You alternatively can implement Biohazards [https://github.com/SCell555/sdk-2013-deferred deferred lighting] here is a port for {{src13mp|4.1}} as originally it was made for {{as|4.1}}.}} | |||
{{todo|Make tutorial on how to implement deferred lighting in your source engine project, and also how to use it.}} | |||
{{csgo}} Represented by class <code>CCascadeLight</code>. | {{csgo}} Represented by class <code>CCascadeLight</code>. | ||
Revision as of 10:52, 13 November 2023


It is also available in Black Mesa.
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 Cascaded Shadow Maps, or CSM, 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: Make tutorial on how to implement deferred lighting in your source engine project, and also how to use it.
Represented by class
CCascadeLight
.
Keyvalues
- Light Color (color) <color255>
- This is the color of the sunlight. For
, the color is automatically copied from the light_environment.
- Max shadow distance (maxshadowdistance) <float>
- Maximum dynamic shadow distance. Higher values are slower, default on PC is 400 units.
- Use light_environment's angles (uselightenvangles) <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 (LightRadius1) to LightRadius3 <float> (only in
)
- Used for controlling shadow softness in cascades 1, 2, and 3.
- Depthbias1 (Depthbias1) to Depthbias3 <float> (only in
)
- DepthBias for cascades 1, 2, and 3.
- Slopescaledepthbias1 (Slopescaledepthbias1) to Slopescaledepthbias3 <float> (only in
)
- Slope DepthBias for cascades 1, 2, and 3.
- ViewModelDepthbias (ViewModelDepthbias) <float> (only in
)
- DepthBias for viewmodel cascade.
- ViewModelSlopescaledepthbias (ViewModelSlopescaledepthbias) <float> (only in
)
- DepthBias for viewmodel cascade.
- CSM_Volume_Mode (CSMVolumeMode) <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.
Outputs
See Also
- light_environment
- Shadow_control
- env_sun
- Skybox Basics
- Skybox lighting
- Advanced Lighting
- Effect flags (dynamic light effects)
- newLight_Dir
- env_lensflare
- newLight_Point
- BlackMesa XenEngine: Part3 – CSM 2.0 (page from Black Mesa developer about their own CSM implementation)