gs_bow
A full-screen post-process pass that draws the film's rainbow: a spectral primary, a reversed secondary, Alexander's dark band between them, the bright interior with its supernumerary fringes, and a reflected arc lying in the flood.
gs_bow — the rainbow, as light
A full-screen post-process pass that draws the film's rainbow: a spectral primary, a reversed secondary, Alexander's dark band between them, the bright interior with its supernumerary fringes, and a reflected arc lying in the flood.
It is a post-process shader, not a surface. Each pixel's world-space view
ray is rebuilt from the frame's own engine.inv_view_proj, its deviation
angle from antisolar is measured, and that angle picks a wavelength. The
result is added to the frame the pass receives, so nothing is occluded —
the storm deck's filaments read straight through the coloured band.
Registering it
postprocess.add("gs_bow", asset.resolve("greensky.sky.gs_bow", "shader"),
{ priority = 6, layer = "scene" })
priority must be greater than 5. The volumetric cloud composites at
priority 5 and its shader is if (d > 0.0) { return scene; } over the scene
depth blit, so anything drawn before it — including any world geometry, at
any blend mode — is either a hole punched in the cloud or erased by it.
Driving it
Every property is written per frame with
postprocess.setProperty("gs_bow", name, value).
| property | what it does |
|---|---|
strength | overall gain; 0 makes the pass an early-out pass-through |
secondary_gain | the outer bow's brightness, and the depth of Alexander's band |
reflect_gain | the arc lying in the flood |
ground_gain | how much of the direct arc survives where the ray ends on something solid |
near_fade / far_fade | metres over which the arc fades in behind near geometry |
water_y | the flood's surface height, for the reflected arc's hit test |
ray_flip | -1 reverses the reconstructed ray, for a flipped projection convention |
antisolar | the negated sun direction, as an array {x, y, z} |
antisolar is a float3 and is declared last in properties.yaml. A
float3 ahead of the scalars makes every scalar in the block read 0 while the
pass reports compiled, enabled and not pending (#10485).
Scoped to this part · feeds back into the world's score.