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

Function Screen

TombEngine/Math/Utils.cpp:157–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 }
156
157 Vector3 Screen(const Vector3& ambient, const Vector3& tint)
158 {
159 float luma = Luma(tint);
160 auto multiplicative = ambient * tint;
161 auto additive = ambient + tint;
162
163 return Vector3(
164 Lerp(multiplicative.x, additive.x, luma),
165 Lerp(multiplicative.y, additive.y, luma),
166 Lerp(multiplicative.z, additive.z, luma));
167 }
168
169 Vector4 Screen(const Vector4& ambient, const Vector4& tint)
170 {

Callers

nothing calls this directly

Calls 4

LumaFunction · 0.85
LerpFunction · 0.85
Vector3Function · 0.50
Vector4Function · 0.50

Tested by

no test coverage detected