๐Ÿ“ฆ rparrett / bevy_pipelines_ready

Bevy plugin for tracking render pipeline status.

โ˜… 24 stars โ‘‚ 1 forks ๐Ÿ‘ 24 watching โš–๏ธ Other
bevygame-developmentrust
๐Ÿ“ฅ Clone https://github.com/rparrett/bevy_pipelines_ready.git
HTTPS git clone https://github.com/rparrett/bevy_pipelines_ready.git
SSH git clone git@github.com:rparrett/bevy_pipelines_ready.git
CLI gh repo clone rparrett/bevy_pipelines_ready
Rob Parrett Rob Parrett Prepare 0.8 release (#17) 6e44562 6 days ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ examples
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ Cargo.toml
๐Ÿ“„ LICENSE
๐Ÿ“„ README.md
๐Ÿ“„ README.md

bevypipelinesready

crates.io docs Bevy tracking

A tiny Bevy plugin that counts the number of render pipelines that are ready and makes that data available as a resource in the main world.

Bevy's shaders are compiled on-demand. On native platforms, they are compiled asynchronously, which can create pop-in effects. On the web, they are compiled synchronously in the single-threaded environment, which can cause hitches and can be pretty disastrous if music is playing.

This plugin can help you get your shaders compiled during a loading state where it won't cause as much trouble for your players.

Usage

See examples/states.rs.

WebGL2 and WebGPU

Build

# WebGL
cargo build --target wasm32-unknown-unknown --example "states" --features="webgl2"

# WebGPU
cargo build --target wasm32-unknown-unknown --example "states" --features="webgpu"

Bindgen

mkdir -p examples/wasm/target
wget https://raw.githubusercontent.com/bevyengine/bevy/refs/tags/v0.15.0/examples/wasm/index.html -O examples/wasm/index.html
wasm-bindgen --out-dir examples/wasm/target --out-name wasm_example --target web target/wasm32-unknown-unknown/debug/examples/states.wasm

Serve

basic-http-server examples/wasm/

Compatibility

bevy_pipelines_readybevy
0.80.18
0.70.17
0.60.16
0.50.15
0.40.14
0.30.13
0.20.12
0.10.11

Contributing

Please feel free to open a PR.