Rays lose LF and HF energy separately based on how far they travel through air.
There is an in-built air absorption formula that's based on humidity, temperature and pressure. You can adjust each value via this `airAbsorption` object:
```cs
var settings = new RaytracingContextSettings();
settings.airAbsorption.HumidityPercent = 0.1f;
settings.airAbsorption.TemperatureFarenheit = 78.8f;
settings.airAbsorption.PressurePascals = 101325;
```
Air absorption is also affected by the `metersPerUnit`, `speedOfSound`, `frequencyReferenceLF` and `frequencyReferenceHF` settings. Read more: [[Creating a Raytracing Context]].
You can also provide custom formulas for air absorption:
```cs
settings.airAbsorption.CustomFormulaLF = (float distance) =>
{
// Return how much LF energy should be lost, in the range 0.0 to 1.0
return distance / 15000.0f;
};
settings.airAbsorption.CustomFormulaHF = (float distance) =>
{
// Return how much HF energy should be lost, in the range 0.0 to 1.0
return distance / 2000.0f;
}
```
You can also completely disable air absorption:
```cs
settings.airAbsorption = null;
```
## Reference
View the `AtmosphericAbsorption.cs` file in the `SDK > References` folder to see how the default air absorption formula works.