Skip to content

Commit

Permalink
feature: WIP occlusion culling (#137)
Browse files Browse the repository at this point in the history
* use WeakHybrid in InternalRenderlet

* Occlusion culling, part one

added MipMapGenerator, depth pyramid shaders

slab buffers are created with size 1 to avoid wgpu validation bug

fixed a bug where re-staging a texture often copied to the wrong layer

debbugging led to better sphere projection for culling

update sample count so we don't invalidate every frame

debug overlay of bounding spheres

use box instead of circle for bounds in debug overlay

don't use compute culling by default

* regenerate shaders, fix merge errors, treat *.spv and *.wgsl as binary

* use cargo-gpu on branch

* clean rust-gpu checkouts (temporary)

* also clean the rust-gpu cache dir

* allow the cache to persist

* don't use bool as u32 in shaders

* change rust-gpu cache step

* update cargo gpu
  • Loading branch information
schell authored Nov 15, 2024
1 parent ce0487c commit 61eecac
Show file tree
Hide file tree
Showing 86 changed files with 7,419 additions and 4,053 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[alias]
shaders = "gpu build --output-dir crates/renderling/shaders --shader-crate crates/renderling/ --shader-manifest crates/renderling/shaders/manifest.json"
shaders = "gpu toml crates/renderling"

[build]
rustflags = ["--cfg=web_sys_unstable_apis"]
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.spv binary
*.wgsl binary
6 changes: 2 additions & 4 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.cache/rust-gpu
key: ${{ runner.os }}
key: 0-${{ runner.os }}
- uses: moonrepo/setup-rust@v1
- run: rustup toolchain add nightly-2024-04-24
- run: rustup component add --toolchain nightly-2024-04-24 rust-src rustc-dev llvm-tools
- run: cargo install --git https://github.com/rust-gpu/cargo-gpu
- run: RUST_LOG=trace cargo install --git https://github.com/rust-gpu/cargo-gpu
- run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders
- run: RUST_LOG=trace cargo shaders
- run: cargo build -p renderling
Expand Down
Loading

0 comments on commit 61eecac

Please sign in to comment.