Closed dkotd closed 2 months ago
The inverse-distance attenuation model implemented in Steam Audio does the following:
return 1.0f / std::max(distance, minDistance);
So if minDistance
is very small, the computed value is very large (as you can see when minDistance
is set to 0.01). In particular, when minDistance
is 0, and distance
also becomes 0, then the expression evaluates to infinity, so we want minDistance > 0
. This has to do with the fact that true point sources cannot physically exist in the real world.
System Information
Issue Description When I enable inverse distance attenuation with minDistance = 0.0f and reflection mode at the same time,
iplReflectionEffectApply
returns an output buffer with NaN values. When minDistance = 0.01f, the output buffer of the reflection sounds incredibly loud.Sample Code