Deep Field
README.md
water — the column
Deep Field happens on one vertical line from a hull down to a thousand metres, and this slice is the line. Everything between the camera and whatever it is looking at is drawn here.
What is in it
| File | What it is |
|---|---|
df_water_column.shader | The column. One full-screen post-process pass: per-channel absorption, the downwelling sky integrated in closed form, the lamp's throw ray-marched as a volume, marine snow in nine parallax layers, and caustics on the underside of the surface. |
df_grade.module | What the water LOOKS like at a depth. Five stops down the column, interpolated — plus the bloom and vignette settings, and the lamp curve. Grade.at(depth) is a pure function and can be read without drawing a frame. |
DfWaterColumn.component | Reads Core.state.depth and .brightness every frame, asks df_grade, pushes the answer into the pass. Runs in edit mode as well as play. |
df_boot.module | The slice's entry point. Registers df_water, df_bloom and df_vignette, and puts the driver under df_water_rig. |
df_lamp_glass.material | The lure's glass envelope. |
The three passes, in order
df_water (100) → df_bloom (200) → df_vignette (300). The water runs first
because it IS the scene's lighting; the bloom reads what the water produced;
the vignette closes the frame last.
Reaching it from another slice
Nothing here needs calling. If a slice wants the water to fade — under a
cutscene, behind an end card — the driver entity df_water_column carries a
gain field on its DfWaterColumn component that multiplies the whole column.
Two numbers other slices should know, because they decide what a creature looks like at a given moment:
- Colour dies with distance, per channel. Red is gone by about three metres, green by ten, blue carries thirty or more in the fringe and less further down. A creature outside the lamp's throw is a blue-grey silhouette however it is painted; one inside it has its own colour. Paint for the near case and let the water do the far case.
- The lamp's throw ends where
Core.lampReach(brightness, depth)says. The water andDfCreaturequote the same function, so "in the throw" means the same thing to the picture and to the animal.