Additional smoke fix for r54464: floating point precision still sometimes produced way too high values. Now values are also clamped within correct range.

This commit is contained in:
Miika Hamalainen
2013-02-11 15:03:22 +00:00
parent eb723ad555
commit 203301e26e

View File

@@ -1591,6 +1591,7 @@ BLI_INLINE void apply_inflow_fields(SmokeFlowSettings *sfs, float emission_value
if (value > react[index]) {
float f = fuel_flow / fuel[index];
react[index] = value * f + (1.0f - f) * react[index];
CLAMP(react[index], 0.0f, value);
}
}
}