Commit graph

9 commits

Author SHA1 Message Date
Firestar99
f12b4da549
Shaders: add BufferStruct to support bool and enums (#3109)
* node-macro: modernize `node` macro

* node-macro: add `CrateIdent` struct containing resolved crate paths

* shaders: add trait `BufferStruct` and derive macro

* shaders: `gamma_correction` and `channel_mixer` gpu nodes

* shaders: `selective_color` gpu node

* shaders: `brightness_contrast_classic` gpu node

* shaders: append GPU to display name

* node-macro: fixup doc links

* shaders: consistently append " GPU" to all shader node names
2025-09-05 16:32:41 +00:00
Firestar99
5d441c2e18
Shaders: runtime and shader node codegen (#2985)
* shader-rt: initial

* shader-rt: fix recursion when generating shader node

* shader-rt: replace gpu node's args and ret types with `Raster<GPU>`

* shader-rt: properly cfg out the gpu node

* shader-rt: fix `impl Context` in the wrong places

* shader-rt: disable gpu blend node, needs two images

* shader-rt: connect shader runtime

* shader-rt: pass WgpuExecutor by reference

* shader-rt: correct bindings with derpy arg buffer

* shader-rt: manual pipeline layout, fixing errors when bindings got DCE'd

* shader-rt: correct RT format, working invert gpu node

* shader-rt: cleanup codegen with common sym struct

* shader-rt: correct arg buffer handling

* shader-nodes feature: put shader nodes behind feature gate

* shader-nodes feature: rename any `gpu_node` to `shader-node`

* shaders-rt: fix wgpu label name

* shaders-rt: explain fullscreen_vertex coordinates with a drawing
2025-09-05 08:33:53 +02:00
Firestar99
a10103311e
Shaders: rust-gpu integration to compile shader nodes to WGSL (#3097)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* shaders: shader compilation setup

* nix: use rustc_codegen_spirv.so from nix

* shaders: codegen for per_pixel_adjust shader nodes

* shaders: disable nodes needing bool

* shaders: `#[repr(u32)]` some enums

* shaders: add lint ignores from rust-gpu

* shaders: fix node-macro tests

* gcore-shaders: toml cleanup

* shader-nodes feature: put rust-gpu to wgsl compile behind feature gate

* shaders: fix use TokenStream2

* shaders: allow providing shader externally

* Update iai runner in workflow

---------

Co-authored-by: Timon Schelling <me@timon.zip>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-09-02 14:10:32 +00:00
Firestar99
82784b46a0
Add node input type support for f32 to enable usage on GPU (#3095)
* update Cargo.lock

* f32: switch to f32 params

* f32: more f32 params, remove f32 casts

* f32: property support for f32

* f32: fix test `stable_node_id_generation`

* Fix f32 properties

* Fix f32 frontend data types

* Rename TaggedValue::Vec2 to ::FVec2 and ::Affine2 to ::FAffine2

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-27 20:08:45 -07:00
Firestar99
a744499f4f
Shaders: more graster-nodes no-std fixups (#3090)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* gcore-shaders: fix missing `num-traits/libm` features

* graster-nodes: fix missing cfg on use statements

* shaders: use unchecked Color constructors

* graster-nodes: remove async from shader nodes not needing it

* gcore-shaders: remove explicit fn pointer

* graster-nodes: make kurbo std-only

* graster-nodes: replace glam reexport with normal dep

* gcore: impl Display for ProtoNodeIdentifier

* unify glam workspace dep
2025-08-26 18:25:05 +00:00
Dennis Kobert
7377871106
Fix clippy warnings (#3085)
* Run clippy fix

* Clippy v2

* Make const item static

* Cargo fmt
2025-08-23 11:45:47 +02:00
Firestar99
0a53eae4e0
Remove unused cargo dependencies (#3063)
* cargo shear

* fix warnings on master

* fix docs needing dev-dependency
2025-08-18 11:26:44 -07:00
Firestar99
caa228a1ec
Shaders: graster-nodes no-std fixups (#2984)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* wgpu-executor: remove useless features

* wgpu-executor: cleanup copy-pasted code

* gcore-shaders: no_std fixups
2025-08-06 14:10:08 +00:00
Firestar99
4fec24893e
Shaders: add gcore-shaders and make graster-nodes no-std (#2925)
* gcore-shaders: add crate, move `color` and `blending` from gcore

* gcore-shaders: move `AsU32`

* gcore-shaders: move `ChoiceType`, switch `Cow` for `&str`, adjust node macro

* gcore-shaders: move `registry::types`

* gcore-shaders: move `context::Ctx`

* raster-nodes: make it `no_std` with `std` feature

* gcore-shaders: fix doctest
2025-07-25 17:53:26 +00:00