mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 02:09:19 +02:00
Replace interpolate with std::lerp and glm::mix
This commit is contained in:
@@ -191,7 +191,7 @@ openal_source::sync_with( sound_properties const &State ) {
|
||||
// adjust the volume to a suitable fraction of nominal value
|
||||
auto const fadedistance { sound_range * 0.75f };
|
||||
auto const rangefactor {
|
||||
interpolate(
|
||||
std::lerp(
|
||||
1.f, 0.f, std::clamp(
|
||||
( distancesquared - rangesquared ) / ( fadedistance * fadedistance ),
|
||||
0.f, 1.f ) ) };
|
||||
|
||||
Reference in New Issue
Block a user