mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-30 00:24:59 +00:00
10 lines
222 B
GLSL
Executable File
10 lines
222 B
GLSL
Executable File
void mx_dodge_float(float fg, float bg, float mixval, out float result)
|
|
{
|
|
if (abs(1.0 - fg) < M_FLOAT_EPS)
|
|
{
|
|
result = 0.0;
|
|
return;
|
|
}
|
|
result = mixval*(bg / (1.0 - fg)) + ((1.0-mixval)*bg);
|
|
}
|