Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3306336
Shadow mapping
schell Nov 25, 2024
59529fd
using ManagedBindGroup, fixed wgpu runtime errors w/ bingroup invalid…
schell Jan 17, 2025
168db6a
assert shadow mapping test images
schell Jan 17, 2025
6cf6f22
chore: initial shadow mapping with shadow maps hosted in an atlas (#157)
schell Feb 9, 2025
b8c0512
smooth shadows - PCF, better depth picking for shadow maps
schell Feb 10, 2025
6f6d06e
workflow
schell Feb 10, 2025
b715b97
bump cargo-gpu
schell Feb 11, 2025
552545b
fix normal_mapping_brick_sphere test after changing directional light…
schell Feb 14, 2025
b6cf067
bumped craballoc, ensure geometry slab is updated before updating sha…
schell Feb 14, 2025
a677932
include spot lights in lighting again, adjustment to point and spot l…
schell Feb 15, 2025
b35a990
create depth texture function takes label
schell Feb 15, 2025
3187eaf
added a simple spot light scene
schell Feb 16, 2025
f4cc552
finally fixed spot lights' light calculation
schell Feb 17, 2025
dbbe808
update spot light and shadow mapping test scenes
schell Feb 17, 2025
a998b0b
add ShadowCalculation to spot lights in pbr shader
schell Feb 17, 2025
20570cf
shadow mapping for spot lights
schell Feb 17, 2025
3c170cc
don't capture
schell Feb 17, 2025
91b36b4
can update point light shadow maps
schell Feb 22, 2025
f5557b5
chore: handrolled cubemap sampling (#159)
schell Mar 3, 2025
e13c8d3
fix: shadow light space calc (#160)
schell Mar 8, 2025
a82c7be
use cargo nextest, only use metal on macos
schell Mar 8, 2025
bc2a747
CI: renamed install-cargo-gpu step to install-cargo-deps
schell Mar 8, 2025
858264f
CI: depend on install-cargo-deps
schell Mar 8, 2025
7acd2e7
CI: refactor
schell Mar 8, 2025
1912f20
don't test cubemap sampling of Vec3::ZERO
schell Mar 8, 2025
238df63
CI: install-cargo-gpu
schell Mar 8, 2025
c3cb3ed
update bytemuck
schell Mar 9, 2025
cea42fe
reduce workgroup sizes for windows
schell Mar 9, 2025
47992e9
regenerate shaders
schell Mar 9, 2025
41053ea
bump cargo-gpu
schell Mar 9, 2025
db76eb7
CI: thrash on windows runner
schell Mar 9, 2025
b7917bb
CI: thrash on windows runner
schell Mar 9, 2025
ec7e1c4
pr fixup
schell Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[alias]
xtask = "run --package xtask --"
shaders = "xtask compile-shaders"
linkage = "xtask generate-linkage"

[build]
rustflags = ["--cfg=web_sys_unstable_apis"]
Expand Down
97 changes: 31 additions & 66 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ on:
env:
# For setup-rust, see https://github.com/moonrepo/setup-rust/issues/22
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_GPU_COMMITSH: adab62777abc06eb0e93518f480c70f6e5d816fe

jobs:
# Installs `cargo-gpu` and sets the cache directory for subsequent jobs
# Installs cargo deps and sets the cache directory for subsequent jobs
install-cargo-gpu:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -34,11 +35,12 @@ jobs:
with:
path: ~/.cargo
# THIS KEY MUST MATCH BELOW
key: cargo-cache-1-${{ runner.os }}
key: cargo-cache-${{ env.CARGO_GPU_COMMITSH }}-${{ runner.os }}
- uses: moonrepo/setup-rust@v1
- run: rustup default stable
- run: rustup update
- run: cargo install --git https://github.com/rust-gpu/cargo-gpu cargo-gpu
- run: |
cargo install --git https://github.com/rust-gpu/cargo-gpu --rev $CARGO_GPU_COMMITSH cargo-gpu
- run: cargo gpu show commitsh
- id: cachepathstep
run: |
Expand Down Expand Up @@ -66,7 +68,7 @@ jobs:
with:
path: ~/.cargo
# THIS KEY MUST MATCH ABOVE
key: cargo-cache-1-${{ runner.os }}
key: cargo-cache-${{ env.CARGO_GPU_COMMITSH }}-${{ runner.os }}
- uses: actions/cache@v4
with:
path: |
Expand All @@ -77,7 +79,8 @@ jobs:
- uses: moonrepo/setup-rust@v1
- run: cargo gpu show commitsh
- run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders
- run: cargo xtask compile-shaders
- run: cargo shaders
- run: cargo linkage
- run: cargo build -p renderling
- run: git diff --exit-code --no-ext-diff

Expand All @@ -98,72 +101,34 @@ jobs:
- run: cargo build -p example

# BAU tests
renderling-test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers
- run: cargo test
env:
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-output-linux
path: test_output/**/*.png

renderling-test-macos:
runs-on: macos-latest
renderling-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: cargo test
env:
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v4
if: always()
- uses: actions/cache@v4
with:
name: test-output-macos
path: test_output/**/*.png
path: ~/.cargo
key: ${{ runner.os }}-test-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

renderling-test-windows:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: moonrepo/setup-rust@v1
- run: cargo test
env:
- name: Install linux deps
if: runner.os == 'Linux'
run: sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers

- name: Install cargo-nextest
run: cargo install --locked cargo-nextest || true

- name: Test
run: cargo nextest run -j 1
env:
RUST_BACKTRACE: 1

- uses: actions/upload-artifact@v4
if: always()
with:
name: test-output-windows
path: test_output/**/*.png

# various linuxes w/ physical gpus
# renderling-test-linux-other:
# continue-on-error: true
# strategy:
# matrix:
# label: [intel, amd, pi4]
# runs-on: ${{ matrix.label }}
# steps:
# - uses: actions/checkout@v2
# - uses: moonrepo/setup-rust@v1
# with:
# cache: false
# - uses: Swatinem/rust-cache@v2
# with:
# cache-all-crates: "true"
# cache-on-failure: "true"
# - run: apt-get -q -y update && apt-get -q -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers
# - run: cargo test -j 1 -- --test-threads=1 --nocapture
# continue-on-error: ${{ matrix.label == 'pi4' }}
# env:
# RUST_BACKTRACE: 1
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: test-output-${{ matrix.label }}
# path: test_output/**/*.png
name: test-output-${{ runner.os }}
path: test_output
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ test_output
cmy_triangle_renderer.svg
.aider*
flamegraph.svg
**/*.blend1
Loading