This article's documentation is for anything that uses the Source engine. Click here for more information.

Math colorblend: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
(-cleanup)
Line 1: Line 1:
{{LanguageBar}}
__NOTOC__
__NOTOC__
{{Source topicon}}
{{Source topicon}}
{{Lang}}
{{CD|CMathColorBlend|file1=logicentities.cpp}}
{{CD|CMathColorBlend|file1=logicentities.cpp}}
{{this is a|point entity|name=math_colorblend}} It is used to create a blend between two colors for controlling the color of another entity.
{{this is a|point entity|name=math_colorblend}} It is used to create a blend between two colors for controlling the color of another entity.


{{note|The following entities can accept [[color255]] inputs: [[env_sun]], [[env_lightglow]], [[env_beam]], [[env_fog_controller]], [[env_sprite]], [[light_dynamic]], [[shadow_control]], as well as any entity which uses rendercolor.}}
{{note|The following entities can accept [[color255]] inputs: [[env_sun]], [[env_lightglow]], [[env_beam]], [[env_fog_controller]], [[env_sprite]], [[light_dynamic]], [[shadow_control]], as well as any entity which uses rendercolor.}}


== Keyvalues ==
== Keyvalues ==
{{KV|start}}
{{KV Targetname]1}}
{{KV Targetname|new=1}}
{{KV|Minimum Valid Input Value|intn=inmin|integer|Input values below this value will be ignored.}}
{{KV|new=1|inmin|integer|Minimum Valid Input Value|value=0|Input values below this value will be ignored.}}
{{KV|Maximum Valid Input Value|intn=inmax|integer|Input values above this value will be ignored.}}
{{KV|new=1|inmax|integer| Maximum Valid Input Value|value=1|Input values above this value will be ignored.}}
{{KV|Output RGB color when input is min|intn=colormin|color255|When the input value is equal to 'Minimum Valid Input Value', this is the output RGB color.}}
{{KV|new=1|colormin|color255|Output RGB color when input is min.|color=0 0 0|When the input value is equal to 'Minimum Valid Input Value', this is the output RGB color.}}
{{KV|Output RGB color when input is max|intn=colormax|color255|When the input value is equal to 'Maximum Valid Input Value', this is the output RGB color.}}
{{KV|new=1|colormax|color255|Output RGB color when input is max.|color=255 255 255|When the input value is equal to 'Maximum Valid Input Value', this is the output RGB color.}}
{{KV|end}}


== Outputs ==
== Flags ==
{| class="standard-table" width="100%"
{{fl|1|Ignore out of range input values}}
! Output
! Variable
! Description
|-
| align="center" width="8%" | OutColor
| align="center" width="8%" | <[[color255]]>
| Fired when the InValue input is received, with the remapped RGB color as the parameter.
|}


== Inputs ==
== Inputs ==
{| class="standard-table" width="100%"
{{IO|InValue|param=float|Input value and fire the output with the remapped value.}}
! Input
! Variable
! Description
|-
| align="center" width="8%" | InValue
| align="center" width="8%" | <[[float]]>
| Input value and fire the output with the remapped value.
|}


== Flags ==
== Outputs ==
{{fl|1|Ignore out of range input values}}
{{IO|OutColor|param=color255|Fired when the InValue input is received, with the remapped RGB color as the parameter}}

Revision as of 11:53, 13 July 2024

English (en)Translate (Translate)

C++ Class hierarchy
CMathColorBlend
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ logicentities.cpp

math_colorblend is a point entity available in all Source Source games. It is used to create a blend between two colors for controlling the color of another entity.

Note.pngNote:The following entities can accept color255 inputs: env_sun, env_lightglow, env_beam, env_fog_controller, env_sprite, light_dynamic, shadow_control, as well as any entity which uses rendercolor.

Keyvalues

{{KV Targetname]1}}

Minimum Valid Input Value (inmin) <integer>
Input values below this value will be ignored.
Maximum Valid Input Value (inmax) <integer>
Input values above this value will be ignored.
Output RGB color when input is min (colormin) <color255>
When the input value is equal to 'Minimum Valid Input Value', this is the output RGB color.
Output RGB color when input is max (colormax) <color255>
When the input value is equal to 'Maximum Valid Input Value', this is the output RGB color.

Flags

Ignore out of range input values : [1]

Inputs

InValue <floatRedirectInput/float>
Input value and fire the output with the remapped value.

Outputs

OutColor <color255RedirectInput/color32>
Fired when the InValue input is received, with the remapped RGB color as the parameter