Env dof controller: Difference between revisions
Jump to navigation
Jump to search

m (the l4d series have this entity, too) |
m (→Inputs: "near focus death" isn't any manner of demise I've ever heard of (fix typo)) |
||
(16 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{CD|CEnvDOFController|file1=env_dof_controller.cpp}} | |||
{{This is a|logical entity|name=env_dof_controller|since=Left 4 Dead|sprite=1}} {{also|{{mapbase}}}} This entity controls the [[W:depth of field|depth of field]] settings for all players. | |||
{{CD|C_EnvDOFController|base=C_BaseEntity|client=1|file1=[https://github.com/ReactiveDrop/reactivedrop_public_src/blob/master/src/game/client/c_env_dof_controller.cpp c_env_dof_controller.cpp]}} | |||
== Keyvalues == | == Keyvalues == | ||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV|Enabled|intn=enabled|since=AS|boolean|Whether the effect should begin active. If it starts inactive, it must be enabled with <code>SetNearBlurRadius</code> or <code>SetFarBlurRadius</code>.}} | |||
{{KV|Near blur depth|intn=near_blur|since=AS|float|Distance that the blurriness is at its peak near the viewpoint.}} | |||
{{KV|Near focus depth|intn=near_focus|since=AS|float|Distance that the focus is in full effect near the viewpoint.}} | |||
{{KV|Near blur radius|intn=near_radius|since=AS|float|Radius (in pixels) to blur the surrounding pixels.}} | |||
{{KV|Far blur depth|intn=far_blur|since=AS|float|Distance where blurriness is at its peak far from the viewpoint.}} | |||
{{KV|Far focus depth|intn=far_focus|since=AS|float|Distance that the focus is in full effect far from the viewpoint.}} | |||
{{KV|Far blur radius|intn=far_radius|since=AS|float|Radius (in pixels) to blur the surrounding pixels.}} | |||
{{KV|Focus target|intn=focus_target|since=AS|target_source|Entity to use as a focal point.}} | |||
{{KV|Focus target range|intn=focus_range|since=AS|float|Distance behind the focal plane to remain in focus.}} | |||
== Inputs == | ==Inputs== | ||
{{ | {{I|SetNearBlurDepth|Set the distance in front of the focus region at which the scene will be completely blurred using the near blur radius. Must be smaller than the near focus depth.|param=float}} | ||
{{ | {{I|SetNearFocusDepth|The area between the near focus and far focus distances is perfectly in focus. Must be smaller than the far focus depth.|param=float}} | ||
{{ | {{I|SetFarFocusDepth|The area between the near focus and far focus distances is perfectly in focus. Must be smaller than the far blur depth.|param=float}} | ||
{{ | {{I|SetFarBlurDepth|Set the distance beyond the focus region at which the scene will be completely blurred using the far blur radius. Must be larger than the far focus depth.|param=float}} | ||
{{ | {{I|SetNearBlurRadius|Set the blur radius (in pixels) to use at the near blur distance. Set to 0 to disable near blur.|param=float}} | ||
{{ | {{I|SetFarBlurRadius|Set the blur radius (in pixels) to use at the far blur distance. Set to 0 to disable far blur.|param=float}} | ||
{{ | {{I|SetFocusTarget|since=AS|Set the focal target for the effect.|param=string}} | ||
{{ | {{I|SetFocusTargetRange|since=AS|Set the distance behind the focal point that will remain in focus.|param=float}} | ||
[[Category:Mapbase entities]] | |||
Latest revision as of 18:26, 8 August 2025
![]() |
---|
CEnvDOFController |
![]() |

env_dof_controller
is a logical entity available in all Source games since
Left 4 Dead. (also in
) This entity controls the depth of field settings for all players.
![]() |
---|
C_EnvDOFController |
![]() |
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Enabled (enabled) <boolean> (in all games since
)
- Whether the effect should begin active. If it starts inactive, it must be enabled with
SetNearBlurRadius
orSetFarBlurRadius
.
- Near blur depth (near_blur) <float> (in all games since
)
- Distance that the blurriness is at its peak near the viewpoint.
- Near focus depth (near_focus) <float> (in all games since
)
- Distance that the focus is in full effect near the viewpoint.
- Near blur radius (near_radius) <float> (in all games since
)
- Radius (in pixels) to blur the surrounding pixels.
- Far blur depth (far_blur) <float> (in all games since
)
- Distance where blurriness is at its peak far from the viewpoint.
- Far focus depth (far_focus) <float> (in all games since
)
- Distance that the focus is in full effect far from the viewpoint.
- Far blur radius (far_radius) <float> (in all games since
)
- Radius (in pixels) to blur the surrounding pixels.
- Focus target range (focus_range) <float> (in all games since
)
- Distance behind the focal plane to remain in focus.
Inputs
- SetNearBlurDepth <float >
- Set the distance in front of the focus region at which the scene will be completely blurred using the near blur radius. Must be smaller than the near focus depth.
- SetNearFocusDepth <float >
- The area between the near focus and far focus distances is perfectly in focus. Must be smaller than the far focus depth.
- SetFarFocusDepth <float >
- The area between the near focus and far focus distances is perfectly in focus. Must be smaller than the far blur depth.
- SetFarBlurDepth <float >
- Set the distance beyond the focus region at which the scene will be completely blurred using the far blur radius. Must be larger than the far focus depth.
- SetNearBlurRadius <float >
- Set the blur radius (in pixels) to use at the near blur distance. Set to 0 to disable near blur.
- SetFarBlurRadius <float >
- Set the blur radius (in pixels) to use at the far blur distance. Set to 0 to disable far blur.