MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / Luma

Function Luma

TombEngine/Math/Utils.cpp:92–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 }
91
92 float Luma(const Vector3& color)
93 {
94 constexpr auto RED_COEFF = 0.2126f;
95 constexpr auto GREEN_COEFF = 0.7152f;
96 constexpr auto BLUE_COEFF = 0.0722f;
97
98 // Use Rec.709 trichromat formula to get perceptive luma value.
99 return float((color.x * RED_COEFF) + (color.y * GREEN_COEFF) + (color.z * BLUE_COEFF));
100 }
101
102 float Chroma(const Vector3& color)
103 {

Callers 9

AddDynamicSpotLightMethod · 0.85
AddDynamicPointLightMethod · 0.85
AddDynamicFogBulbMethod · 0.85
PrepareFiresMethod · 0.85
CollectLightsMethod · 0.85
GetDominantColorMethod · 0.85
TriggerSuperJetFlameFunction · 0.85
ScreenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected