-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip/gltf on the slab build out (#69)
* Support for indexed vertices, ie native vertices can be indexed * debugging gltf on-the-slab textures * debugging gltf on-the-slab textures, still * gltf on-the-slab can use textures * porting over more gltf tests * setting stage images resets the atlas size on the slab * ported over more tests to the slab * ported over atlas_uv_mapping test * ported uv_wrapping test * ported negative_uv_wrapping * WIP porting scene_cube_directional (test of directional lighting) * WIP CPU-side sampling for testing * ported scene_cube_directional test of directional lighting * fixed accessors, they now take their own offset into account * fix accessors - view stuff shouldn't be in GltfAccessor, it should be in GltfBufferView * WIP GLTF is the only internal representation * WIP more work on GLTF is the only internal representation * finished porting tests to gltf-on-the-slab * criterion benchmark stub * added criterion benchmark and ported scene_parent_sanity test * ported pbr test minus bloom * pbr metallic spheres test doesn't use bloom * chore/remove bytemuck from renderling shader (#70) * parted out slab into slabcrab * parted out slab into crabslab * parted out slab into crabslab * Update README.md * readme * WIP part out crabslab, remove non-slab shaders, remove bloom (to be reimplemented later) * WIP * img-diff takes into account pixel threshold and image threshold * fixed problems with the skybox after slabbing * fixed tests to use explicit linear transfer where appropriate
- Loading branch information
Showing
104 changed files
with
5,012 additions
and
5,334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
crates/renderling-derive/Cargo.toml → crates/crabslab-derive/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = "renderling-derive" | ||
name = "crabslab-derive" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[package] | ||
name = "crabslab" | ||
version = "0.1.0" | ||
edition = "2021" | ||
description = "Slab allocator focused on GPU compute (rust-gpu)" | ||
repository = "https://github.com/schell/renderling" | ||
license = "MIT OR Apache-2.0" | ||
keywords = ["game", "graphics", "shader", "rendering"] | ||
categories = ["rendering", "game-development", "graphics"] | ||
readme = "README.md" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[features] | ||
default = ["wgpu", "glam", "futures-lite"] | ||
futures-lite = ["dep:futures-lite"] | ||
glam = ["dep:glam"] | ||
wgpu = ["dep:wgpu", "dep:bytemuck", "dep:snafu", "dep:async-channel", "dep:log"] | ||
|
||
[dependencies] | ||
async-channel = {workspace=true, optional=true} | ||
bytemuck = {workspace=true, optional=true} | ||
futures-lite = {workspace=true, optional=true} | ||
log = {workspace=true, optional=true} | ||
crabslab-derive = { version = "0.1.0", path = "../crabslab-derive" } | ||
snafu = {workspace=true, optional=true} | ||
wgpu = {workspace=true, optional=true} | ||
|
||
[target.'cfg(not(target_arch = "spirv"))'.dependencies] | ||
glam = { workspace = true, features = ["std"], optional = true } | ||
|
||
[target.'cfg(target_arch = "spirv")'.dependencies] | ||
glam = { version = "0.24.2", default-features = false, features = ["libm"], optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<div align="center"> | ||
<img src="crabslab.png" alt="slabcraft for crabs" width="512" /> | ||
</div> | ||
|
||
## what | ||
`crabslab` is a slab implementation focused on marshalling data from CPUs to GPUs. | ||
|
||
## why | ||
### Opinion | ||
Working with shaders is much easier using a slab. | ||
|
||
### rust-gpu | ||
This crate was made to work with [`rust-gpu`](https://github.com/EmbarkStudios/rust-gpu/). | ||
Specifically, using this crate it is possible to pack your types into a buffer on the CPU | ||
and then read your types from the slab on the GPU (in Rust). | ||
|
||
### Other no-std platforms | ||
Even though this crate was written with `rust-gpu` in mind, it should work in other `no-std` | ||
contexts. | ||
|
||
## how | ||
`crabslab` includes: | ||
* a few traits: | ||
- `Slab` | ||
- `GrowableSlab` | ||
- `SlabItem` | ||
* a derive macro for `SlabItem` | ||
* a few structs for working with various slabs | ||
- `Id` | ||
- `Array` | ||
- `Offset` | ||
* a helper struct `CpuSlab` | ||
* a feature-gated helper for using slabs with `wgpu` - `WgpuBuffer` | ||
- [example](src/wgpu_slab.rs#L344) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.