mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
improve acoustics
This commit is contained in:
parent
9f9c7074f7
commit
b355e4568d
1 changed files with 4 additions and 1 deletions
|
|
@ -115,7 +115,10 @@ void Decorator::updateAcoustics(const Camera& camera) {
|
|||
hit++;
|
||||
averageDistance += distance * 0.2f;
|
||||
}
|
||||
float decayTime = (averageDistance / hit) * glm::max(0.0f, glm::pow(hit / static_cast<float>(rays), 9.0f) - 0.6f) * 1.6f;
|
||||
float decayTime =
|
||||
glm::sqrt(averageDistance / hit) *
|
||||
glm::max(0.0f, glm::pow(hit / static_cast<float>(rays), 3.0f) - 0.6f) *
|
||||
1.6f;
|
||||
decayTime *= 2.5f;
|
||||
decayTime *= decayTime;
|
||||
logger.info() << "rays hit " << hit << "/" << rays << " decay-time: " << decayTime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue