Skip to content

Instantly share code, notes, and snippets.

@birarda
Created June 5, 2013 21:46
Show Gist options
  • Select an option

  • Save birarda/5717577 to your computer and use it in GitHub Desktop.

Select an option

Save birarda/5717577 to your computer and use it in GitHub Desktop.
const float DISTANCE_REVERB_LOG_REMAINDER = 0.32f;
const float DISTANCE_REVERB_MAX_WETNESS = 1.0f;
float effectMix = powf(2.0f, (0.5f * logf(distanceSquareToSource) / logf(2.0f)) - DISTANCE_REVERB_LOG_REMAINDER) * DISTANCE_REVERB_MAX_WETNESS / 64.0f;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment