Skip to content

Commit 5459ea3

Browse files
authored
Merge pull request #158 from schell/feature/shadow-mapping
feature: shadow mapping
2 parents bb2b617 + ec7e1c4 commit 5459ea3

File tree

177 files changed

+14672
-6055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+14672
-6055
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[alias]
22
xtask = "run --package xtask --"
3+
shaders = "xtask compile-shaders"
4+
linkage = "xtask generate-linkage"
35

46
[build]
57
rustflags = ["--cfg=web_sys_unstable_apis"]

.github/workflows/push.yaml

Lines changed: 31 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ on:
1010
env:
1111
# For setup-rust, see https://github.com/moonrepo/setup-rust/issues/22
1212
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
CARGO_GPU_COMMITSH: adab62777abc06eb0e93518f480c70f6e5d816fe
1314

1415
jobs:
15-
# Installs `cargo-gpu` and sets the cache directory for subsequent jobs
16+
# Installs cargo deps and sets the cache directory for subsequent jobs
1617
install-cargo-gpu:
1718
strategy:
1819
matrix:
19-
os: [ubuntu-latest, macos-latest, windows-latest]
20+
os: [ubuntu-latest, macos-latest]
2021
runs-on: ${{ matrix.os }}
2122
defaults:
2223
run:
@@ -34,11 +35,12 @@ jobs:
3435
with:
3536
path: ~/.cargo
3637
# THIS KEY MUST MATCH BELOW
37-
key: cargo-cache-1-${{ runner.os }}
38+
key: cargo-cache-${{ env.CARGO_GPU_COMMITSH }}-${{ runner.os }}
3839
- uses: moonrepo/setup-rust@v1
3940
- run: rustup default stable
4041
- run: rustup update
41-
- run: cargo install --git https://github.com/rust-gpu/cargo-gpu cargo-gpu
42+
- run: |
43+
cargo install --git https://github.com/rust-gpu/cargo-gpu --rev $CARGO_GPU_COMMITSH cargo-gpu
4244
- run: cargo gpu show commitsh
4345
- id: cachepathstep
4446
run: |
@@ -66,7 +68,7 @@ jobs:
6668
with:
6769
path: ~/.cargo
6870
# THIS KEY MUST MATCH ABOVE
69-
key: cargo-cache-1-${{ runner.os }}
71+
key: cargo-cache-${{ env.CARGO_GPU_COMMITSH }}-${{ runner.os }}
7072
- uses: actions/cache@v4
7173
with:
7274
path: |
@@ -77,7 +79,8 @@ jobs:
7779
- uses: moonrepo/setup-rust@v1
7880
- run: cargo gpu show commitsh
7981
- run: rm -rf crates/renderling/src/linkage/* crates/renderling/shaders
80-
- run: cargo xtask compile-shaders
82+
- run: cargo shaders
83+
- run: cargo linkage
8184
- run: cargo build -p renderling
8285
- run: git diff --exit-code --no-ext-diff
8386

@@ -98,72 +101,34 @@ jobs:
98101
- run: cargo build -p example
99102

100103
# BAU tests
101-
renderling-test-linux:
102-
runs-on: ubuntu-latest
103-
steps:
104-
- uses: actions/checkout@v2
105-
- uses: moonrepo/setup-rust@v1
106-
- run: sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers
107-
- run: cargo test
108-
env:
109-
RUST_BACKTRACE: 1
110-
- uses: actions/upload-artifact@v4
111-
if: always()
112-
with:
113-
name: test-output-linux
114-
path: test_output/**/*.png
115-
116-
renderling-test-macos:
117-
runs-on: macos-latest
104+
renderling-test:
105+
strategy:
106+
matrix:
107+
os: [ubuntu-latest, macos-latest]
108+
runs-on: ${{ matrix.os }}
118109
steps:
119110
- uses: actions/checkout@v2
120111
- uses: moonrepo/setup-rust@v1
121-
- run: cargo test
122-
env:
123-
RUST_BACKTRACE: 1
124-
- uses: actions/upload-artifact@v4
125-
if: always()
112+
- uses: actions/cache@v4
126113
with:
127-
name: test-output-macos
128-
path: test_output/**/*.png
114+
path: ~/.cargo
115+
key: ${{ runner.os }}-test-cargo-${{ hashFiles('**/Cargo.lock') }}
116+
restore-keys: ${{ runner.os }}-cargo-
129117

130-
renderling-test-windows:
131-
runs-on: macos-latest
132-
steps:
133-
- uses: actions/checkout@v2
134-
- uses: moonrepo/setup-rust@v1
135-
- run: cargo test
136-
env:
118+
- name: Install linux deps
119+
if: runner.os == 'Linux'
120+
run: sudo apt-get -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers
121+
122+
- name: Install cargo-nextest
123+
run: cargo install --locked cargo-nextest || true
124+
125+
- name: Test
126+
run: cargo nextest run -j 1
127+
env:
137128
RUST_BACKTRACE: 1
129+
138130
- uses: actions/upload-artifact@v4
139131
if: always()
140132
with:
141-
name: test-output-windows
142-
path: test_output/**/*.png
143-
144-
# various linuxes w/ physical gpus
145-
# renderling-test-linux-other:
146-
# continue-on-error: true
147-
# strategy:
148-
# matrix:
149-
# label: [intel, amd, pi4]
150-
# runs-on: ${{ matrix.label }}
151-
# steps:
152-
# - uses: actions/checkout@v2
153-
# - uses: moonrepo/setup-rust@v1
154-
# with:
155-
# cache: false
156-
# - uses: Swatinem/rust-cache@v2
157-
# with:
158-
# cache-all-crates: "true"
159-
# cache-on-failure: "true"
160-
# - run: apt-get -q -y update && apt-get -q -y install mesa-vulkan-drivers libvulkan1 vulkan-tools vulkan-validationlayers
161-
# - run: cargo test -j 1 -- --test-threads=1 --nocapture
162-
# continue-on-error: ${{ matrix.label == 'pi4' }}
163-
# env:
164-
# RUST_BACKTRACE: 1
165-
# - uses: actions/upload-artifact@v4
166-
# if: always()
167-
# with:
168-
# name: test-output-${{ matrix.label }}
169-
# path: test_output/**/*.png
133+
name: test-output-${{ runner.os }}
134+
path: test_output

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ test_output
1919
cmy_triangle_renderer.svg
2020
.aider*
2121
flamegraph.svg
22+
**/*.blend1

0 commit comments

Comments
 (0)