Skip to content

RodogInfinite/bevy-vertex-pulling

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bevy-vertex-pulling

Vertex pulling is a useful and efficient technique for drawing many quads or cubes by storing per-instance data in a buffer, indexing into it using an index calculated based on the vertex index, and calculating offsets from a world position for the instance based on which vertex of the quad/cube is being processed.

Running quads-instanced example in the browser

Step 1

From the command line and in the directory with the justfile run just serve and all of the manual steps noted above will be run in order

Step 2

Navigate to http://localhost:3000/generated/quads-instanced.html in the browser

Manually from the command line and with simple-http-server

Step 1

cargo build --release --target wasm32-unknown-unknown --example quads-instanced

Step 2

wasm-bindgen --out-dir generated --web target/wasm32-unknown-unknown/release/examples/quads-instanced.wasm

Step 3

simple-http-server --port 3000 --nocache

Step 4

Navigate to http://localhost:3000/generated/quads-instanced.html in the browser

Approaches Implemented

  • Instance data stored in:
    • Storage buffer
  • Shapes
    • Quads
    • Cuboids/voxels

Things to do/try

License

bevy-vertex-pulling is free and open source! All code in this repository is dual-licensed under either:

at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Vertex pulling for bevy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 97.7%
  • HTML 2.3%