Taos Engine

Rendering

HQ Cloud Pass — the merge experiment

Status: this experiment has concluded and its sample code has been removed from the repository; the HQ cloud path it compared against now lives in the engine (see HQ Volumetric Clouds). The write-up is kept for its findings.

Companion to samples/hq_cloud_pass.ts. This sample tests one hypothesis: the HQ pass's lighting is good, the HQ pass's plumbing is what breaks — so put HQ lighting on the cheaper pass's volume and skip the plumbing.

The two starting points#

CloudPass (engine)HQCloudPass (sample)
ResolutionFull-res, one passHalf-res march + full-res temporal reproject
VolumeFlat slab, ~200-unit march clampSpherical shell, horizon-distance march
Densitycd_sample_density straighthq_density + domain warp + mip LOD
PhaseHenyey-Greenstein dual lobeCornette-Shanks + back lobe
Self-shadow2 straight taps5-tap cone + long tap
ScatteringSingle-scatter + ambient3-octave Wrenninge multi-scatter, Beer-Powder
StatusShips in crafty, looks goodWIP — three unresolved artifacts

The HQ pass's three open issues — axis-aligned puff rows, reproject latency, distant shimmer — are all properties of the right-hand plumbing, not the lighting:

What this sample does#

MergedCloudPass (samples/hq_cloud_merged/merged_cloud_pass.ts) is the engine CloudPass structurally — same four bind groups, same overlay + godray-fog plumbing, same single full-resolution render pass — pointed at clouds_hq_merged.wgsl. The shader keeps the left column (flat slab, cd_sample_density, short march clamp, white-noise dither) and grafts in the right column's lighting only:

Because there is no half-res, no reproject, and no de-tiling machinery, none of the three artifacts can appear in their original form. The single remaining lever is marchDistance (the slab clamp): short keeps the tiling hidden the way CloudPass does; long shows more deck and is where tiling rows would re-emerge. Lower the deck (MIN/MAX H sliders) to pull the whole scene into the clean short-range regime CloudPass was tuned for.

How to read the result#

Open hq_cloud_test.html and this side by side at the same sun angle. Same lighting math; the merged pass should be free of the row banding and the pan latency. The cost: no temporal supersampling, so the white-noise dither is visible without TAA — leave the TAA toggle on (it averages the dither the way CloudPass relies on a fine perceptually-flat grain).

Open questions this experiment is meant to answer#

  1. At what deck height / marchDistance does the flat-slab tiling start to read as rows again? (i.e. how much of the HQ look survives at full range.)
  2. Is the cone self-shadow march stable at full-res single-pass, or does it need the temporal average to stop fireflies on the cone taps?
  3. Does single-pass multi-scatter cost more or less than half-res + reproject in practice, for equal visual quality?