Skip to main content

Module shader_hot_reload

Module shader_hot_reload 

Source
Expand description

.wgsl hot-reload pump.

A PreExtract data system that drains the shader AssetWatcher each tick, maps every changed .wgsl file to its logical shader name, hands the new source to the PipelineSystem backend as an overlay, and recomposes the affected cached pipelines in place. Lanes re-fetch pipelines by key every frame, so they pick up the rebuilt pipeline with no lane-side change.

With no assets directory present, no watcher is registered and the backend keeps serving its embedded include_str! sources — the production path.

Functions§

logical_name_for_shader_path
Maps a watcher-relative .wgsl path to its logical shader module name.