Log inGet started
Package

cloudburst.package

README.md

cb_common

Cloudburst's shared WGSL, included by every Cloudburst shader and by any water or ground shader that wants to answer the rain.

  • cb_hash11/12/22/33, cb_noise2, cb_fbm2: the randomness every layer draws from.
  • cb_wrap, cb_wrap_count: keep a moving drop inside the box that follows the camera.
  • cb_land_height(land, xz): where falling weather meets the top of the world (roofs, canopies, ground). Lives in cb_land, which needs a landmap texture slot and the land placement vec4.
  • cb_ripples(xz, time, rate): rings spreading where drops hit flat water: slope in .xy, ring strength in .z. A pond, puddle or a water kit's own surface includes this module and feeds it the rain rate (require("cloudburst.weather").bind(material) keeps a material's cb_rain property current).
#include "cloudburst.shaderModules.cb_common"
let r = cb_ripples(input.world_position.xz, input.time, material.cb_rain.x);
n = normalize(n + vec3<f32>(r.x, 0.0, r.y));