Fluid: Fix issue with fire emission

Fixes weird behavior at inflow regions. Issue was introduced with d6d44ccc77.
This commit is contained in:
Sebastián Barschkis
2020-03-04 17:46:42 +01:00
parent bf8a73b4a7
commit 8f1876b4f0

View File

@@ -2276,7 +2276,7 @@ BLI_INLINE void apply_inflow_fields(FluidFlowSettings *mfs,
/* Instead of using 1.0 for all new fuel add slight falloff to reduce flow blocky-ness. */
float value = 1.0f - pow2f(1.0f - emission_value);
if (fuel_in[index] > FLT_EPSILON && value >= react[index]) {
if (fuel_in[index] > FLT_EPSILON && value > react[index]) {
float f = fuel_flow / fuel_in[index];
react_in[index] = value * f + (1.0f - f) * react[index];
CLAMP(react_in[index], 0.0f, value);