Light deferred: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Language subpage}}It is also available in other games that use it's source code. It creates an invisible dynamic light source that can shine in all directions or only on one side, combining the features of a {{ent|light}} and a {{ent|light_spot}}. For most optimal light placing use the game's built-in [[Light editor]].
{{Language subpage}}It creates an invisible dynamic light source that can shine in all directions or only on one side, combining the features of a {{ent|light}} and a {{ent|light_spot}}. For most optimal light placing use the game's built-in [[Light editor]].
{{code class|CDeferredLight|CDefLight.cpp}}
{{code class|CDeferredLight|CDefLight.cpp}}
{{confirm|Does this entity also exists in {{p2d|4}}?}}
{{confirm|Does this entity also exists in {{p2d|4}}?}}

Revision as of 05:21, 7 May 2024

English (en)Translate (Translate)

It creates an invisible dynamic light source that can shine in all directions or only on one side, combining the features of a light and a light_spot. For most optimal light placing use the game's built-in Light editor.

C++ In code, it is represented by theCDeferredLightclass, defined in theCDefLight.cppfile.
Confirm:Does this entity also exists in Portal 2: Desolation Portal 2: Desolation?

Keyvalues

Light

Color diffuse (diffuse) <color255 + int>
Sets the light's color and brightness.
Color ambient (ambient) <color255 + int>
Sets the light's ambient color and brightness.
Color Radius (radius) <float>
Set's how much of the world should it light.
Color Falloff powert (power) <float>
[Todo]
Spotlight cone innert (spot_cone_inner) <float>
The angles of the inner spotlight beam.
Spotlight cone outer (spot_cone_outer) <float>
The angles of the outer spotlight beam.
Visible distance (vis_dist) <integer>
Sets how far should it light the world.
Visible fade range (vis_range) <integer>
[Todo]
Shadow distance (shadow_dist) <integer>
Sets how far should it cast shadows.
Shadow fade range (shadow_range) <integer>
[Todo]
Cookie texture (cookietex) <string>
Path to vtf that should be projected.
Lightstyle seed (style_seed) <integer>
[Todo]
Lightstyle amount (style_amt) <float>
[Todo]
Lightstyle speed (style_speed) <float>
[Todo]
Lightstyle smoothing (style_smooth) <float>
[Todo]
Lightstyle random (style_random) <float>
[Todo]
Light type (style) <choices>
Set's different light types.
Point : [0]
Make the light sine in all directions.
Spot : [1]
Make it a spotlight.

Base

Name (targetname) <string>
The name that other entities use to refer to this entity.
Parent (parentname) <targetname>
Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (parentname [targetname],[attachment])
Pitch Yaw Roll (X Y Z) <angle>
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.

Flags

Enabled : [1]
Turns the light on.
Enable shadow : [2]
Enables dynamic shadows
Enable cookie : [4]
Enables cookie texture casting.
Enable volumetrics : [8]
Enables realtime volumetric lighting.
Enable lightstyle : [16]
Enables deferred lightstyles

Inputs

Outputs

See also