---
id: "henyey-greenstein-phase-function"
title: "Henyey-Greenstein Phase Function"
aliases: [HG phase, Cornette-Shanks (variant)]
domain: "volumes"
stage: "volume"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, mobile-gpu, cpu]
year_introduced: 1941
inputs: [volume-density]
outputs: [radiance]
style: "both"
dynamic: "both"
cost: "cheap"
authority: "Henyey & Greenstein, 1941"
url: "https://texelatlas.vercel.app/t/henyey-greenstein-phase-function/"
sources_verified_at: "2026-11-29"
---
# Henyey-Greenstein Phase Function (Henyey & Greenstein, 1941)

> A one-parameter model of the angular distribution of scattered light in a medium; the asymmetry g runs from strongly backward (negative) to strongly forward (positive) scattering.

## Reach for it when

- fog and clouds need forward scattering glow
- volume scattering direction needs one tunable parameter
- light halo around sun seen through haze
- cheap anisotropic scattering for participating media

## How it works

A phase function gives the probability density of light scattering from one direction into another, and depends only on the cosine of the angle between them. The HG form is (1 - g^2) divided by 4 pi times (1 + g^2 - 2 g cos theta) to the power 1.5. With g = 0 it is isotropic; g near 0.7 to 0.9 gives the strong forward lobe seen on clouds and aerosol haze near the sun; negative g gives backscatter. It integrates to one over the sphere and has an exact importance-sampling inverse, so it is cheap in both ray marchers and path tracers. Real media often need two lobes: a forward and a backward HG lobe blended, which also approximates the silver lining and dark core of clouds. Rayleigh scattering uses its own dipole phase and should not be replaced by HG.

## When to use it

Choose it whenever you need anisotropic scattering for fog, clouds, atmospheric Mie scattering or skin-like media at the cost of one pow per evaluation.

Prefer the Rayleigh phase inside [Ray-marched Rayleigh/Mie Single Scattering](https://texelatlas.vercel.app/t/rayleigh-mie-single-scattering.md) for molecular scattering, and use a two-lobe HG mix in [Nubis-style Ray-marched Volumetric Clouds](https://texelatlas.vercel.app/t/nubis-volumetric-clouds.md) or [Multiple-Scattering Approximation by Octaves](https://texelatlas.vercel.app/t/multiple-scattering-octaves.md) when a single lobe cannot capture both the sun glare and the backscattered brightness. For exact droplet behaviour use tabulated Mie phase functions offline.

## Cost

cheap — A few multiplies and one pow per sample.
Measured GPU Weight: 3.19× baseline (light) — 0.1049 ms median / 0.1073 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 3.08× baseline (light) — 0.0489 ms median (2.15× faster on L4).
Ampere A100 scaling: 2.26× baseline (light) — 0.0652 ms median (1.61× faster on A100).

## Failure modes

- Single lobe cannot reproduce the real Mie peak: glory and fogbow are missing
- Using g close to 1 gives a very narrow lobe that aliases in ray marching with few samples
- Forgetting the 4 pi normalization makes fog energy scale wrongly with g
- Applying HG to Rayleigh scattering gives wrong sky polarisation-free brightness and color
- Mismatch of sign convention for the angle (view vs light direction) flips forward and backward scattering

## Engine support

- babylonjs: official — `@babylonjs/addons atmosphereFunctions.fx miePhase (Henyey-Greenstein Mie scattering phase)` (evidence: https://github.com/BabylonJS/Babylon.js/blob/9.38.0/packages/dev/addons/src/atmosphere/Shaders/ShadersInclude/atmosphereFunctions.fx, checked 2026-12-01)
- blender: builtin — `Shader Editor > Add > Shader > Volume Scatter > Phase = Henyey-Greenstein` (evidence: https://docs.blender.org/manual/en/5.2/render/shader_nodes/shader/volume_scatter.html, checked 2026-12-01)
- godot: builtin — `Environment.volumetric_fog_anisotropy drives henyey_greenstein(cos_theta, g) in volumetric_fog_process.glsl` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl, checked 2026-12-01)
- unity: builtin — `HDRP Fog > Anisotropy; Local Volumetric Fog > Anisotropy` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.core/ShaderLibrary/VolumeRendering.hlsl, checked 2026-12-01) — HDRP volumetric fog and clouds use the HG phase function.
- unreal: builtin — `SkyAtmosphereComponent Mie Anisotropy and VolumetricCloud MaterialExpressionVolumetricAdvancedMaterialOutput dual-lobe Phase controls` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/SkyAtmosphereComponent, checked 2026-12-01)

## Dataflow

- Inputs: volume-density
- Outputs: radiance
- Platforms: webgl2, webgpu, desktop-gpu, mobile-gpu, cpu

## Presets

### Henyey-Greenstein anisotropy g = -0.6, 0, 0.8 on a backlit medium (glsl-fragment; rendered 2026-11-29)

```json
{
  "SIGMA": 3.5,
  "RAD": 0.72,
  "LIGHT": 14
}
```

```glsl
// A uniform-density sphere of scattering medium, lit from behind, single scattering only.
// Three panels differ ONLY in the Henyey-Greenstein anisotropy g: -0.6 (back), 0 (isotropic), +0.8 (forward).
const float SIGMA = 3.5;
const float RAD = 0.72;
const float LIGHT = 14.0;

float hg(float c, float g) { float g2 = g * g; return (1.0 - g2) / (12.566371 * pow(1.0 + g2 - 2.0 * g * c, 1.5)); }
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  float pw = iResolution.x / 3.0;
  int panel = int(floor(fragCoord.x / pw));
  float g = panel == 0 ? -0.6 : (panel == 1 ? 0.0 : 0.8);
  vec2 uv = (fragCoord - vec2((float(panel) + 0.5) * pw, 0.5 * iResolution.y)) / (0.5 * pw);
  vec3 col = vec3(0.015, 0.02, 0.03) + 0.02 * (uv.y * 0.5 + 0.5);
  vec3 ro = vec3(uv, 3.0), rd = vec3(0.0, 0.0, -1.0);
  vec3 L = normalize(vec3(0.25, 0.15, -1.0));
  float b = dot(ro, rd); float h = b * b - dot(ro, ro) + RAD * RAD;
  if (h > 0.0) {
    float t0 = -b - sqrt(h), t1 = -b + sqrt(h);
    float ds = (t1 - t0) / 24.0; vec3 acc = vec3(0.0); 
    for (int i = 0; i < 24; i++) {
      float s = (float(i) + 0.5) * ds; vec3 p = ro + rd * (t0 + s);
      float bl = dot(p, L); float tl = -bl + sqrt(max(bl * bl - dot(p, p) + RAD * RAD, 0.0));
      acc += vec3(1.0, 0.95, 0.85) * SIGMA * ds * exp(-SIGMA * s) * exp(-SIGMA * tl) * hg(dot(L, rd), g) * LIGHT;
    }
    col += acc;
  }
  float edge = fract(fragCoord.x / pw);
  if (edge < 0.004 || edge > 0.996) col = vec3(0.3);
  col = 1.0 - exp(-col * 1.5);
  fragColor = vec4(pow(col, vec3(1.0 / 2.2)), 1.0);
}

```

Attribution: written for this index

## Lineage

- extended by [Ray-marched Rayleigh/Mie Single Scattering](https://texelatlas.vercel.app/t/rayleigh-mie-single-scattering.md)

## Combines with

- [Ray-marched Participating Media](https://texelatlas.vercel.app/t/volume-ray-marching.md): Gives the per-sample phase weight applied to in-scattered light.
- [Froxel Volumetric Fog](https://texelatlas.vercel.app/t/froxel-volumetric-fog.md): Used when injecting light into each froxel to produce a forward-scattering halo around lights.

## Sources

1. [primary] L. C. Henyey, J. L. Greenstein (1941) Diffuse radiation in the Galaxy. The Astrophysical Journal. https://doi.org/10.1086/144246 (verified via crossref on 2026-11-29)
2. [tutorial] Matt Pharr, Wenzel Jakob, Greg Humphreys Phase Functions (Physically Based Rendering, 4th ed.). pbr-book.org. https://www.pbr-book.org/4ed/Volume_Scattering/Phase_Functions (verified via http on 2026-11-29)

## Cite this entry

Texel. "Henyey-Greenstein Phase Function." https://texelatlas.vercel.app/t/henyey-greenstein-phase-function/ (accessed 2026-12-01).
