From ff598397372db2e03268706eea6f2d85442b9845 Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:32:09 +0000 Subject: [PATCH] Move the vello crate to the workspace root (#231) * Move the vello crate to the root of the crate * Add warning that README is work in progress * Add newline in warning * Move the unlicense into the shader folder * Fixup wgsl-analyzer include paths --- .vscode/settings.json | 26 +++++----- Cargo.lock | 46 +++++++++--------- Cargo.toml | 19 +++++++- README.md | 18 ++++++- .../assets/Ghostscript_Tiger.svg | 0 .../assets/third-party/LICENSE.txt | 0 .../assets/third-party/Roboto-Regular.ttf | Bin {run-wasm => examples/run_wasm}/Cargo.toml | 0 {run-wasm => examples/run_wasm}/src/main.rs | 0 .../bevy => examples/with_bevy}/Cargo.toml | 2 +- .../bevy => examples/with_bevy}/src/main.rs | 0 .../winit => examples/with_winit}/Cargo.toml | 2 +- .../winit => examples/with_winit}/src/main.rs | 0 .../with_winit}/src/pico_svg.rs | 0 .../with_winit}/src/simple_text.rs | 0 .../with_winit}/src/test_scene.rs | 0 UNLICENSE => shader/UNLICENSE | 0 {vello/shader => shader}/backdrop.wgsl | 0 {vello/shader => shader}/backdrop_dyn.wgsl | 0 {vello/shader => shader}/bbox_clear.wgsl | 0 {vello/shader => shader}/binning.wgsl | 0 {vello/shader => shader}/clip_leaf.wgsl | 0 {vello/shader => shader}/clip_reduce.wgsl | 0 {vello/shader => shader}/coarse.wgsl | 0 {vello/shader => shader}/draw_leaf.wgsl | 0 {vello/shader => shader}/draw_reduce.wgsl | 0 {vello/shader => shader}/fine.wgsl | 0 {vello/shader => shader}/path_coarse.wgsl | 0 .../shader => shader}/path_coarse_full.wgsl | 0 {vello/shader => shader}/pathseg.wgsl | 0 {vello/shader => shader}/pathtag_reduce.wgsl | 0 {vello/shader => shader}/pathtag_scan.wgsl | 0 {vello/shader => shader}/shared/bbox.wgsl | 0 {vello/shader => shader}/shared/blend.wgsl | 0 {vello/shader => shader}/shared/bump.wgsl | 0 {vello/shader => shader}/shared/clip.wgsl | 0 {vello/shader => shader}/shared/config.wgsl | 0 {vello/shader => shader}/shared/cubic.wgsl | 0 {vello/shader => shader}/shared/drawtag.wgsl | 0 {vello/shader => shader}/shared/pathtag.wgsl | 0 {vello/shader => shader}/shared/ptcl.wgsl | 0 {vello/shader => shader}/shared/segment.wgsl | 0 {vello/shader => shader}/shared/tile.wgsl | 0 {vello/shader => shader}/tile_alloc.wgsl | 0 {vello/src => src}/engine.rs | 0 {vello/src => src}/glyph.rs | 0 {vello/src => src}/lib.rs | 0 {vello/src => src}/ramp.rs | 0 {vello/src => src}/render.rs | 0 {vello/src => src}/scene.rs | 0 {vello/src => src}/shaders.rs | 0 {vello/src => src}/shaders/preprocess.rs | 0 {vello/src => src}/util.rs | 0 vello/Cargo.toml | 16 ------ vello/README.md | 11 ----- 55 files changed, 74 insertions(+), 66 deletions(-) rename {vello/examples => examples}/assets/Ghostscript_Tiger.svg (100%) rename {vello/examples => examples}/assets/third-party/LICENSE.txt (100%) rename {vello/examples => examples}/assets/third-party/Roboto-Regular.ttf (100%) rename {run-wasm => examples/run_wasm}/Cargo.toml (100%) rename {run-wasm => examples/run_wasm}/src/main.rs (100%) rename {vello/examples/bevy => examples/with_bevy}/Cargo.toml (90%) rename {vello/examples/bevy => examples/with_bevy}/src/main.rs (100%) rename {vello/examples/winit => examples/with_winit}/Cargo.toml (96%) rename {vello/examples/winit => examples/with_winit}/src/main.rs (100%) rename {vello/examples/winit => examples/with_winit}/src/pico_svg.rs (100%) rename {vello/examples/winit => examples/with_winit}/src/simple_text.rs (100%) rename {vello/examples/winit => examples/with_winit}/src/test_scene.rs (100%) rename UNLICENSE => shader/UNLICENSE (100%) rename {vello/shader => shader}/backdrop.wgsl (100%) rename {vello/shader => shader}/backdrop_dyn.wgsl (100%) rename {vello/shader => shader}/bbox_clear.wgsl (100%) rename {vello/shader => shader}/binning.wgsl (100%) rename {vello/shader => shader}/clip_leaf.wgsl (100%) rename {vello/shader => shader}/clip_reduce.wgsl (100%) rename {vello/shader => shader}/coarse.wgsl (100%) rename {vello/shader => shader}/draw_leaf.wgsl (100%) rename {vello/shader => shader}/draw_reduce.wgsl (100%) rename {vello/shader => shader}/fine.wgsl (100%) rename {vello/shader => shader}/path_coarse.wgsl (100%) rename {vello/shader => shader}/path_coarse_full.wgsl (100%) rename {vello/shader => shader}/pathseg.wgsl (100%) rename {vello/shader => shader}/pathtag_reduce.wgsl (100%) rename {vello/shader => shader}/pathtag_scan.wgsl (100%) rename {vello/shader => shader}/shared/bbox.wgsl (100%) rename {vello/shader => shader}/shared/blend.wgsl (100%) rename {vello/shader => shader}/shared/bump.wgsl (100%) rename {vello/shader => shader}/shared/clip.wgsl (100%) rename {vello/shader => shader}/shared/config.wgsl (100%) rename {vello/shader => shader}/shared/cubic.wgsl (100%) rename {vello/shader => shader}/shared/drawtag.wgsl (100%) rename {vello/shader => shader}/shared/pathtag.wgsl (100%) rename {vello/shader => shader}/shared/ptcl.wgsl (100%) rename {vello/shader => shader}/shared/segment.wgsl (100%) rename {vello/shader => shader}/shared/tile.wgsl (100%) rename {vello/shader => shader}/tile_alloc.wgsl (100%) rename {vello/src => src}/engine.rs (100%) rename {vello/src => src}/glyph.rs (100%) rename {vello/src => src}/lib.rs (100%) rename {vello/src => src}/ramp.rs (100%) rename {vello/src => src}/render.rs (100%) rename {vello/src => src}/scene.rs (100%) rename {vello/src => src}/shaders.rs (100%) rename {vello/src => src}/shaders/preprocess.rs (100%) rename {vello/src => src}/util.rs (100%) delete mode 100644 vello/Cargo.toml delete mode 100644 vello/README.md diff --git a/.vscode/settings.json b/.vscode/settings.json index 2cea097..883465a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,17 +1,19 @@ { "wgsl-analyzer.customImports": { - "bbox": "${workspaceFolder}/vello/shader/shared/bbox.wgsl", - "blend": "${workspaceFolder}/vello/shader/shared/blend.wgsl", - "bump": "${workspaceFolder}/vello/shader/shared/bump.wgsl", - "clip": "${workspaceFolder}/vello/shader/shared/clip.wgsl", - "config": "${workspaceFolder}/vello/shader/shared/config.wgsl", - "cubic": "${workspaceFolder}/vello/shader/shared/cubic.wgsl", - "drawtag": "${workspaceFolder}/vello/shader/shared/drawtag.wgsl", - "pathtag": "${workspaceFolder}/vello/shader/shared/pathtag.wgsl", - "ptcl": "${workspaceFolder}/vello/shader/shared/ptcl.wgsl", - "segment": "${workspaceFolder}/vello/shader/shared/segment.wgsl", - "tile": "${workspaceFolder}/vello/shader/shared/tile.wgsl" + "bbox": "${workspaceFolder}/shader/shared/bbox.wgsl", + "blend": "${workspaceFolder}/shader/shared/blend.wgsl", + "bump": "${workspaceFolder}/shader/shared/bump.wgsl", + "clip": "${workspaceFolder}/shader/shared/clip.wgsl", + "config": "${workspaceFolder}/shader/shared/config.wgsl", + "cubic": "${workspaceFolder}/shader/shared/cubic.wgsl", + "drawtag": "${workspaceFolder}/shader/shared/drawtag.wgsl", + "pathtag": "${workspaceFolder}/shader/shared/pathtag.wgsl", + "ptcl": "${workspaceFolder}/shader/shared/ptcl.wgsl", + "segment": "${workspaceFolder}/shader/shared/segment.wgsl", + "tile": "${workspaceFolder}/shader/shared/tile.wgsl" }, "wgsl-analyzer.diagnostics.nagaVersion": "main", - "wgsl-analyzer.preprocessor.shaderDefs": ["full"] + "wgsl-analyzer.preprocessor.shaderDefs": [ + "full" + ] } diff --git a/Cargo.lock b/Cargo.lock index 14e4b06..7f533df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -392,14 +392,6 @@ dependencies = [ "encase_derive_impl", ] -[[package]] -name = "bevy_example" -version = "0.1.0" -dependencies = [ - "bevy", - "vello", -] - [[package]] name = "bevy_gilrs" version = "0.9.1" @@ -3961,21 +3953,6 @@ dependencies = [ "x11-dl", ] -[[package]] -name = "winit-demo" -version = "0.1.0" -dependencies = [ - "console_error_panic_hook", - "console_log", - "pollster", - "roxmltree", - "vello", - "wasm-bindgen-futures", - "web-sys", - "wgpu", - "winit", -] - [[package]] name = "wio" version = "0.2.2" @@ -4049,6 +4026,29 @@ dependencies = [ "wit-schema-version", ] +[[package]] +name = "with_bevy" +version = "0.1.0" +dependencies = [ + "bevy", + "vello", +] + +[[package]] +name = "with_winit" +version = "0.1.0" +dependencies = [ + "console_error_panic_hook", + "console_log", + "pollster", + "roxmltree", + "vello", + "wasm-bindgen-futures", + "web-sys", + "wgpu", + "winit", +] + [[package]] name = "x11-dl" version = "2.20.1" diff --git a/Cargo.toml b/Cargo.toml index a53b415..5ab2ce7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" -members = ["vello", "vello/examples/winit", "vello/examples/bevy", "run-wasm"] +members = ["examples/with_winit", "examples/with_bevy", "examples/run_wasm"] [workspace.package] edition = "2021" @@ -12,3 +12,20 @@ authors = ["piet-gpu developers"] # Required for metal support to work on wgpu # TODO: remove when wgpu is upgraded to 0.15 naga = { git = "https://github.com/gfx-rs/naga", rev = "ddcd5d3121150b2b1beee6e54e9125ff31aaa9a2" } + +[package] +name = "vello" +version = "0.1.0" +authors = ["Raph Levien "] +license = "MIT/Apache-2.0" +edition = "2021" + +[dependencies] +wgpu = "0.14" +raw-window-handle = "0.5" +futures-intrusive = "0.5.0" +parking_lot = "0.12" +bytemuck = { version = "1.12.1", features = ["derive"] } +smallvec = "1.8.0" +moscato = { git = "https://github.com/dfrg/pinot" } +peniko = { git = "https://github.com/linebender/peniko" } diff --git a/README.md b/README.md index 274866b..97ca590 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ This repo contains the new prototype for a new compute-centric 2D GPU renderer (formerly known as piet-gpu). +> **Warning** +> This README is a work in progress. Previous versions are included below for reference + It succeeds the previous prototype, [piet-metal]. The latest version is a middleware for [`wgpu`]. This is used as the rendering backend for @@ -33,7 +36,7 @@ A prior incarnation used a custom cross-API hal. An archive of this version can The piet-gpu project is dual-licensed under both [Apache 2.0](LICENSE-APACHE) and [MIT](LICENSE_MIT) licenses. -In addition, the shaders are provided under the terms of the [Unlicense](UNLICENSE). The intent is for this research to be used in as broad a context as possible. +In addition, the shaders are provided under the terms of the [Unlicense](./shader/UNLICENSE). The intent is for this research to be used in as broad a context as possible. The dx12 backend was adapted from piet-dx12 by Brian Merchant. @@ -46,3 +49,16 @@ Contributions are welcome by pull request. The [Rust code of conduct] applies. [rust code of conduct]: https://www.rust-lang.org/policies/code-of-conduct [`custom-hal-archive-with-shaders`]: https://github.com/linebender/piet-gpu/tree/custom-hal-archive-with-shaders [`custom-hal-archive`]: https://github.com/linebender/piet-gpu/tree/custom-hal-archive + + +# vello + +This crate is currently a highly experimental proof-of-concept port of the piet-gpu renderer to the WGSL shader language, so it could be run on WebGPU. Depending on how well it works out, it may become the authoritative source for piet-gpu. + +The shaders are actually handlebars templates over WGSL, as it's important to share common data structures; it's likely we'll use the template mechanism to supply various parameters which are not supported by the WGSL language, for example to specify grayscale or RGBA buffer output for fine rasterization. + +This crate also uses a very different approach to the GPU abstraction than piet-gpu. That is essentially a HAL that supports an immediate mode approach to creating resources and submitting commands. Here, we generate a `Recording`, which is basically a simple value type, then an `Engine` plays that recording to the actual GPU. The idea is that this can abstract easily over multiple GPU back-ends, without either the render logic needing to be polymorphic or having dynamic dispatch at the GPU abstraction. The goal is to be more agile. + +Scene encoding is shared with piet-gpu, and currently uses piet-scene in the same repo with no changes. + +This module is still an experimental work in progress. Contributions can be made with the same policy as the root repo, but expect things to change quickly. diff --git a/vello/examples/assets/Ghostscript_Tiger.svg b/examples/assets/Ghostscript_Tiger.svg similarity index 100% rename from vello/examples/assets/Ghostscript_Tiger.svg rename to examples/assets/Ghostscript_Tiger.svg diff --git a/vello/examples/assets/third-party/LICENSE.txt b/examples/assets/third-party/LICENSE.txt similarity index 100% rename from vello/examples/assets/third-party/LICENSE.txt rename to examples/assets/third-party/LICENSE.txt diff --git a/vello/examples/assets/third-party/Roboto-Regular.ttf b/examples/assets/third-party/Roboto-Regular.ttf similarity index 100% rename from vello/examples/assets/third-party/Roboto-Regular.ttf rename to examples/assets/third-party/Roboto-Regular.ttf diff --git a/run-wasm/Cargo.toml b/examples/run_wasm/Cargo.toml similarity index 100% rename from run-wasm/Cargo.toml rename to examples/run_wasm/Cargo.toml diff --git a/run-wasm/src/main.rs b/examples/run_wasm/src/main.rs similarity index 100% rename from run-wasm/src/main.rs rename to examples/run_wasm/src/main.rs diff --git a/vello/examples/bevy/Cargo.toml b/examples/with_bevy/Cargo.toml similarity index 90% rename from vello/examples/bevy/Cargo.toml rename to examples/with_bevy/Cargo.toml index 87bb208..9c5600a 100644 --- a/vello/examples/bevy/Cargo.toml +++ b/examples/with_bevy/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "bevy_example" +name = "with_bevy" version = "0.1.0" edition = "2021" diff --git a/vello/examples/bevy/src/main.rs b/examples/with_bevy/src/main.rs similarity index 100% rename from vello/examples/bevy/src/main.rs rename to examples/with_bevy/src/main.rs diff --git a/vello/examples/winit/Cargo.toml b/examples/with_winit/Cargo.toml similarity index 96% rename from vello/examples/winit/Cargo.toml rename to examples/with_winit/Cargo.toml index e0d7987..c702e3d 100644 --- a/vello/examples/winit/Cargo.toml +++ b/examples/with_winit/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "winit-demo" +name = "with_winit" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/vello/examples/winit/src/main.rs b/examples/with_winit/src/main.rs similarity index 100% rename from vello/examples/winit/src/main.rs rename to examples/with_winit/src/main.rs diff --git a/vello/examples/winit/src/pico_svg.rs b/examples/with_winit/src/pico_svg.rs similarity index 100% rename from vello/examples/winit/src/pico_svg.rs rename to examples/with_winit/src/pico_svg.rs diff --git a/vello/examples/winit/src/simple_text.rs b/examples/with_winit/src/simple_text.rs similarity index 100% rename from vello/examples/winit/src/simple_text.rs rename to examples/with_winit/src/simple_text.rs diff --git a/vello/examples/winit/src/test_scene.rs b/examples/with_winit/src/test_scene.rs similarity index 100% rename from vello/examples/winit/src/test_scene.rs rename to examples/with_winit/src/test_scene.rs diff --git a/UNLICENSE b/shader/UNLICENSE similarity index 100% rename from UNLICENSE rename to shader/UNLICENSE diff --git a/vello/shader/backdrop.wgsl b/shader/backdrop.wgsl similarity index 100% rename from vello/shader/backdrop.wgsl rename to shader/backdrop.wgsl diff --git a/vello/shader/backdrop_dyn.wgsl b/shader/backdrop_dyn.wgsl similarity index 100% rename from vello/shader/backdrop_dyn.wgsl rename to shader/backdrop_dyn.wgsl diff --git a/vello/shader/bbox_clear.wgsl b/shader/bbox_clear.wgsl similarity index 100% rename from vello/shader/bbox_clear.wgsl rename to shader/bbox_clear.wgsl diff --git a/vello/shader/binning.wgsl b/shader/binning.wgsl similarity index 100% rename from vello/shader/binning.wgsl rename to shader/binning.wgsl diff --git a/vello/shader/clip_leaf.wgsl b/shader/clip_leaf.wgsl similarity index 100% rename from vello/shader/clip_leaf.wgsl rename to shader/clip_leaf.wgsl diff --git a/vello/shader/clip_reduce.wgsl b/shader/clip_reduce.wgsl similarity index 100% rename from vello/shader/clip_reduce.wgsl rename to shader/clip_reduce.wgsl diff --git a/vello/shader/coarse.wgsl b/shader/coarse.wgsl similarity index 100% rename from vello/shader/coarse.wgsl rename to shader/coarse.wgsl diff --git a/vello/shader/draw_leaf.wgsl b/shader/draw_leaf.wgsl similarity index 100% rename from vello/shader/draw_leaf.wgsl rename to shader/draw_leaf.wgsl diff --git a/vello/shader/draw_reduce.wgsl b/shader/draw_reduce.wgsl similarity index 100% rename from vello/shader/draw_reduce.wgsl rename to shader/draw_reduce.wgsl diff --git a/vello/shader/fine.wgsl b/shader/fine.wgsl similarity index 100% rename from vello/shader/fine.wgsl rename to shader/fine.wgsl diff --git a/vello/shader/path_coarse.wgsl b/shader/path_coarse.wgsl similarity index 100% rename from vello/shader/path_coarse.wgsl rename to shader/path_coarse.wgsl diff --git a/vello/shader/path_coarse_full.wgsl b/shader/path_coarse_full.wgsl similarity index 100% rename from vello/shader/path_coarse_full.wgsl rename to shader/path_coarse_full.wgsl diff --git a/vello/shader/pathseg.wgsl b/shader/pathseg.wgsl similarity index 100% rename from vello/shader/pathseg.wgsl rename to shader/pathseg.wgsl diff --git a/vello/shader/pathtag_reduce.wgsl b/shader/pathtag_reduce.wgsl similarity index 100% rename from vello/shader/pathtag_reduce.wgsl rename to shader/pathtag_reduce.wgsl diff --git a/vello/shader/pathtag_scan.wgsl b/shader/pathtag_scan.wgsl similarity index 100% rename from vello/shader/pathtag_scan.wgsl rename to shader/pathtag_scan.wgsl diff --git a/vello/shader/shared/bbox.wgsl b/shader/shared/bbox.wgsl similarity index 100% rename from vello/shader/shared/bbox.wgsl rename to shader/shared/bbox.wgsl diff --git a/vello/shader/shared/blend.wgsl b/shader/shared/blend.wgsl similarity index 100% rename from vello/shader/shared/blend.wgsl rename to shader/shared/blend.wgsl diff --git a/vello/shader/shared/bump.wgsl b/shader/shared/bump.wgsl similarity index 100% rename from vello/shader/shared/bump.wgsl rename to shader/shared/bump.wgsl diff --git a/vello/shader/shared/clip.wgsl b/shader/shared/clip.wgsl similarity index 100% rename from vello/shader/shared/clip.wgsl rename to shader/shared/clip.wgsl diff --git a/vello/shader/shared/config.wgsl b/shader/shared/config.wgsl similarity index 100% rename from vello/shader/shared/config.wgsl rename to shader/shared/config.wgsl diff --git a/vello/shader/shared/cubic.wgsl b/shader/shared/cubic.wgsl similarity index 100% rename from vello/shader/shared/cubic.wgsl rename to shader/shared/cubic.wgsl diff --git a/vello/shader/shared/drawtag.wgsl b/shader/shared/drawtag.wgsl similarity index 100% rename from vello/shader/shared/drawtag.wgsl rename to shader/shared/drawtag.wgsl diff --git a/vello/shader/shared/pathtag.wgsl b/shader/shared/pathtag.wgsl similarity index 100% rename from vello/shader/shared/pathtag.wgsl rename to shader/shared/pathtag.wgsl diff --git a/vello/shader/shared/ptcl.wgsl b/shader/shared/ptcl.wgsl similarity index 100% rename from vello/shader/shared/ptcl.wgsl rename to shader/shared/ptcl.wgsl diff --git a/vello/shader/shared/segment.wgsl b/shader/shared/segment.wgsl similarity index 100% rename from vello/shader/shared/segment.wgsl rename to shader/shared/segment.wgsl diff --git a/vello/shader/shared/tile.wgsl b/shader/shared/tile.wgsl similarity index 100% rename from vello/shader/shared/tile.wgsl rename to shader/shared/tile.wgsl diff --git a/vello/shader/tile_alloc.wgsl b/shader/tile_alloc.wgsl similarity index 100% rename from vello/shader/tile_alloc.wgsl rename to shader/tile_alloc.wgsl diff --git a/vello/src/engine.rs b/src/engine.rs similarity index 100% rename from vello/src/engine.rs rename to src/engine.rs diff --git a/vello/src/glyph.rs b/src/glyph.rs similarity index 100% rename from vello/src/glyph.rs rename to src/glyph.rs diff --git a/vello/src/lib.rs b/src/lib.rs similarity index 100% rename from vello/src/lib.rs rename to src/lib.rs diff --git a/vello/src/ramp.rs b/src/ramp.rs similarity index 100% rename from vello/src/ramp.rs rename to src/ramp.rs diff --git a/vello/src/render.rs b/src/render.rs similarity index 100% rename from vello/src/render.rs rename to src/render.rs diff --git a/vello/src/scene.rs b/src/scene.rs similarity index 100% rename from vello/src/scene.rs rename to src/scene.rs diff --git a/vello/src/shaders.rs b/src/shaders.rs similarity index 100% rename from vello/src/shaders.rs rename to src/shaders.rs diff --git a/vello/src/shaders/preprocess.rs b/src/shaders/preprocess.rs similarity index 100% rename from vello/src/shaders/preprocess.rs rename to src/shaders/preprocess.rs diff --git a/vello/src/util.rs b/src/util.rs similarity index 100% rename from vello/src/util.rs rename to src/util.rs diff --git a/vello/Cargo.toml b/vello/Cargo.toml deleted file mode 100644 index 423680c..0000000 --- a/vello/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "vello" -version = "0.1.0" -authors = ["Raph Levien "] -license = "MIT/Apache-2.0" -edition = "2021" - -[dependencies] -wgpu = "0.14" -raw-window-handle = "0.5" -futures-intrusive = "0.5.0" -parking_lot = "0.12" -bytemuck = { version = "1.12.1", features = ["derive"] } -smallvec = "1.8.0" -moscato = { git = "https://github.com/dfrg/pinot" } -peniko = { git = "https://github.com/linebender/peniko" } diff --git a/vello/README.md b/vello/README.md deleted file mode 100644 index 858292d..0000000 --- a/vello/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# vello - -This crate is currently a highly experimental proof-of-concept port of the piet-gpu renderer to the WGSL shader language, so it could be run on WebGPU. Depending on how well it works out, it may become the authoritative source for piet-gpu. - -The shaders are actually handlebars templates over WGSL, as it's important to share common data structures; it's likely we'll use the template mechanism to supply various parameters which are not supported by the WGSL language, for example to specify grayscale or RGBA buffer output for fine rasterization. - -This crate also uses a very different approach to the GPU abstraction than piet-gpu. That is essentially a HAL that supports an immediate mode approach to creating resources and submitting commands. Here, we generate a `Recording`, which is basically a simple value type, then an `Engine` plays that recording to the actual GPU. The idea is that this can abstract easily over multiple GPU back-ends, without either the render logic needing to be polymorphic or having dynamic dispatch at the GPU abstraction. The goal is to be more agile. - -Scene encoding is shared with piet-gpu, and currently uses piet-scene in the same repo with no changes. - -This module is still an experimental work in progress. Contributions can be made with the same policy as the root repo, but expect things to change quickly.