---
id: "hosek-wilkie-sky"
title: "Hosek-Wilkie Sky Model"
aliases: [Hosek sky, analytic full-spectral sky-dome radiance]
domain: "volumes"
stage: "volume"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, cpu]
year_introduced: 2012
inputs: [material-params]
outputs: [radiance, hdr-image]
style: "photoreal"
dynamic: "dynamic"
cost: "cheap"
authority: "Hosek & Wilkie, 2012"
url: "https://texelatlas.vercel.app/t/hosek-wilkie-sky/"
sources_verified_at: "2026-11-29"
---
# Hosek-Wilkie Sky Model (Hosek & Wilkie, 2012)

> Analytic sky-dome radiance fitted to brute-force atmospheric simulations, with turbidity, ground albedo and solar elevation controls and a correct sun-disc and horizon behaviour.

## Reach for it when

- need accurate daytime sky colour from dawn to dusk
- sun halo and horizon look wrong in my analytic sky
- sky dome with turbidity and ground albedo controls
- want a visible solar aureole cheaply
- realistic sky without a full atmosphere simulation

## How it works

Like the Perez-style approach, the sky radiance is a closed-form expression in the view direction and sun angle, but the fit is far more accurate. A nine-parameter formula adds terms for the circumsolar brightening (a Mie-like lobe), for horizon darkening, and for multiple scattering, with a ground-albedo dependence. The nine coefficients and a zenith radiance are not computed analytically: they are interpolated from tables obtained by fitting simulation data over turbidity, albedo, solar elevation and wavelength. The RGB variant uses tables for three wavelength bands, and a spectral version covers many bands. At run time you fetch the coefficients once per frame on the CPU (sun elevation and turbidity change slowly) and evaluate one formula per pixel on the GPU.

## When to use it

Choose it for ground-based skies when you want accurate color from dawn to dusk, including a visible solar aureole, and when the table-lookup coefficients can be baked into uniforms.

Prefer [Preetham Analytic Daylight Model](https://texelatlas.vercel.app/t/preetham-sky.md) when a smaller code footprint is more important than accuracy. Prefer [Scalable Production Sky and Atmosphere (Hillaire)](https://texelatlas.vercel.app/t/hillaire-sky-atmosphere.md) when you need aerial perspective, camera altitude changes or a sun below the horizon. Prefer [Precomputed Atmospheric Scattering](https://texelatlas.vercel.app/t/precomputed-atmospheric-scattering.md) for planet-scale views.

## Cost

cheap — One formula evaluation per pixel; coefficient interpolation is done on the CPU once per frame.
Measured GPU Weight: 4.79× baseline (light) — 0.1577 ms median / 0.1591 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 4.2× baseline (light) — 0.0668 ms median (2.36× faster on L4).
Ampere A100 scaling: 2.89× baseline (light) — 0.0833 ms median (1.89× faster on A100).

## Failure modes

- Coefficient tables are large and embedded as data, which makes porting error-prone
- Valid only for sun above or near the horizon; twilight needs another model
- No aerial perspective: distant objects are not tinted
- Ground albedo only changes the sky radiance, not the ground itself
- RGB fit can show a slight hue shift versus the spectral version

## Engine support

- blender: builtin — `Sky Texture node > Sky Type = Hosek/Wilkie` (evidence: https://docs.blender.org/manual/en/5.2/render/shader_nodes/textures/sky.html, checked 2026-12-01) — Marked legacy and slated for removal.

## Dataflow

- Inputs: material-params
- Outputs: radiance, hdr-image
- Platforms: webgl2, webgpu, desktop-gpu, cpu

## Presets

### Hosek-Wilkie analytic sky dome with circumsolar aureole, turbidity and ocean reflection (glsl-fragment; rendered 2026-11-30)

```json
{
  "TURBIDITY": 3,
  "SUN_ELEV": 0.24,
  "ALBEDO": 0.35,
  "EXPOSURE": 1.1
}
```

```glsl
const float TURBIDITY = 3.0; // P
const float SUN_ELEV = 0.24; // P
const float ALBEDO = 0.35; // P
const float EXPOSURE = 1.1; // P

float chi(float g, float cosG) {
  float d = max(1.0 + g * g - 2.0 * g * cosG, 1e-4);
  return (1.0 + cosG * cosG) / pow(d, 1.5);
}

vec3 hosekSky(vec3 dir, vec3 sunDir, float turb, float elev, float alb) {
  float cosT = max(dir.y, 0.002);
  float cosG = clamp(dot(dir, sunDir), -1.0, 1.0);
  float gamma = acos(cosG);
  float t = clamp((turb - 1.0) / 9.0, 0.0, 1.0);
  float s = clamp(elev / 1.4, 0.0, 1.0);

  // Hosek-Wilkie 9-parameter structure fitted across turbidity, elevation & ground albedo
  vec3 A = mix(vec3(-1.12, -1.08, -0.98), vec3(-0.78, -0.82, -0.88), t);
  vec3 B = mix(vec3(-0.34, -0.38, -0.44), vec3(-0.18, -0.22, -0.26), t);
  vec3 C = mix(vec3(0.28, 0.42, 0.68), vec3(0.82, 0.72, 0.60), t) * (1.0 + 0.35 * alb);
  vec3 D = mix(vec3(3.8, 2.4, 1.2), vec3(1.5, 1.25, 0.95), s) * mix(1.0, 1.5, t);
  vec3 E = vec3(-2.6, -2.85, -3.2);
  vec3 F = mix(vec3(0.24, 0.30, 0.42), vec3(0.18, 0.20, 0.22), t);
  vec3 G = mix(vec3(0.05, 0.065, 0.08), vec3(0.14, 0.13, 0.11), t);
  vec3 H = mix(vec3(0.22, 0.48, 1.05), vec3(0.65, 0.62, 0.58), t) * (0.65 + 0.5 * alb);
  float gMie = mix(0.74, 0.88, t);

  vec3 expM = exp(E * gamma);
  vec3 rayM = vec3(cosG * cosG);
  vec3 mieM = vec3(chi(gMie, cosG));
  vec3 zenith = mix(vec3(0.26, 0.20, 0.34), vec3(0.12, 0.38, 0.95), pow(s, 0.55));
  zenith = mix(zenith, vec3(0.45, 0.44, 0.46), t * 0.45) * (0.45 + 0.85 * s);

  vec3 Fval = (1.0 + A * exp(B / (cosT + 0.01))) * (C + D * expM + F * rayM + G * mieM + H * sqrt(cosT));
  vec3 sky = max(Fval * zenith, 0.0);

  // Limb-darkened solar disk + aureole
  float sunRad = 0.028;
  float ang = gamma;
  float disk = smoothstep(sunRad, sunRad * 0.55, ang);
  float limb = sqrt(max(1.0 - (ang / sunRad) * (ang / sunRad), 0.0));
  vec3 sunCol = mix(vec3(1.0, 0.36, 0.10), vec3(1.0, 0.94, 0.84), pow(s, 0.45)) * mix(1.0, 0.72, t);
  sky += sunCol * (disk * (14.0 + 22.0 * limb) + 0.38 * exp(-ang * 7.0) * (1.0 + t));
  return sky;
}

vec3 aces(vec3 x) {
  x = max(x, 0.0);
  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  float elev = clamp(SUN_ELEV + 0.06 * sin(iTime * 0.35), 0.03, 1.35);
  float azim = 0.25 * sin(iTime * 0.22);
  if (iMouse.z > 0.5 || length(iMouse.xy) > 1.0) {
    vec2 m = iMouse.xy / iResolution.xy;
    elev = clamp(m.y * 1.15 + 0.03, 0.03, 1.35);
    azim = (m.x - 0.5) * 1.8;
  }
  vec3 sunDir = normalize(vec3(sin(azim) * cos(elev), sin(elev), -cos(azim) * cos(elev)));
  vec3 rd = normalize(vec3(uv.x, uv.y + 0.14, -1.05));

  float turb = max(TURBIDITY, 1.0);
  float alb = clamp(ALBEDO, 0.0, 1.0);
  vec3 col;
  if (rd.y >= 0.0) {
    col = hosekSky(rd, sunDir, turb, elev, alb);
  } else {
    float t = -1.2 / min(rd.y, -0.002);
    vec2 p = rd.xz * t;
    float w1 = sin(p.x * 1.4 + iTime * 1.6 + sin(p.y * 0.8)) * 0.015;
    float w2 = cos(p.y * 2.1 - iTime * 1.2 + p.x * 0.7) * 0.012;
    vec3 n = normalize(vec3(w1, 1.0, w2));
    vec3 refl = reflect(rd, n);
    refl.y = max(refl.y, 0.004);
    float fres = 0.04 + 0.96 * pow(1.0 - max(dot(-rd, n), 0.0), 5.0);
    vec3 skyR = hosekSky(normalize(refl), sunDir, turb, elev, alb);
    vec3 sea = vec3(0.012, 0.032, 0.065) * (0.25 + 0.65 * sin(elev));
    col = mix(sea, skyR, fres * 0.85);
    vec3 horiz = hosekSky(normalize(vec3(rd.x, 0.005, rd.z)), sunDir, turb, elev, alb);
    col = mix(horiz, col, exp(-0.018 * t));
  }
  col *= max(EXPOSURE, 0.1);
  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index

## Lineage

- extends [Preetham Analytic Daylight Model](https://texelatlas.vercel.app/t/preetham-sky.md)

## Combines with

- [Exponential Height Fog](https://texelatlas.vercel.app/t/exponential-height-fog.md): Sky horizon radiance gives a matching fog color.

## Combination ideas

- [Day-cycle relighting for a dot product](https://texelatlas.vercel.app/ideas/time-of-day-prt/)

## Sources

1. [primary] Lukas Hosek, Alexander Wilkie (2012) An analytic model for full spectral sky-dome radiance. ACM Transactions on Graphics. https://doi.org/10.1145/2185520.2185591 (verified via crossref on 2026-11-29)

## Cite this entry

Texel. "Hosek-Wilkie Sky Model." https://texelatlas.vercel.app/t/hosek-wilkie-sky/ (accessed 2026-12-01).
