Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit664b176f3e

README.md

cloud_surface

Where a cloud ray meets the scene. Every cloud raymarcher includes it and ends each ray at the surface the scene drew under its cell (@scene.depth), so a cloud between the camera and the ground covers the ground and the part of the layer behind a surface adds nothing.

  • cloud_cell_scene_pixel(cell, cells, scene) names the scene pixel a layer cell reads its surface from. cloud_layer_composite reads the same pixel for the same cell when it lays the layer over the frame.
  • cloud_surface_distance(cell, cells, cam_pos, inv_view_proj) is the world distance to that surface, or the largest finite f32 over sky.

The including shader binds scene_depth as kind: texture_depth.