Creates precipitation; settings not given use DEFAULT_PRECIPITATION.
Camera the particles surround.
Ground height for splashes (frame coordinates).
ReadonlyobjectAdd this to your scene.
Resolved settings.
ReadonlysampleWeather read at the camera on the last update.
ReadonlyuniformsShader uniforms, for advanced tweaks.
Camera frame position modulo the box, so particles stay put in the world.
Box size (2 radius, height, 2 radius).
Camera position, render space.
Animation clock (time modulo 600 s).
Accumulated wind drift modulo the box.
Flutter.
Rain colour.
Rain opacity.
Rain fall speed.
Rain width.
Rain shutter.
Snow colour.
Snow opacity.
Flake size.
Snow fall speed.
Splash opacity.
Splash size.
Current wind velocity (x, 0, z), m/s.
Weather to read.
Removes everything from the scene and frees GPU resources.
Replaces all settings (anything not given goes back to defaults).
Merges input into the settings. Counts rebuild the buffers; looks are live uniforms.
Sets the frame position at render-space zero (floating origin), [x, y, z].
Reads the weather at the camera and animates everything to time seconds.
GPU rain streaks, snowflakes and splash rings around the camera, driven by a Weather: density from the precipitation rate, rain/sleet/snow from the snow fraction, slant and drift from the wind. All particles of a kind are one instanced draw call, positioned entirely in the vertex shader (wrapped in a box that follows the camera, so they never run out); only splashes are placed on the CPU (they need the ground height).
Example