mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 14:18:11 +08:00
Shaders: rust-gpu integration to compile shader nodes to WGSL (#3097)
* 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>
This commit is contained in:
co-authored by
Timon Schelling
Dennis Kobert
parent
083dfa5f49
commit
a10103311e
@@ -141,6 +141,7 @@ fn blend<T: Blend<Color> + Send>(
|
||||
Table<GradientStops>,
|
||||
GradientStops,
|
||||
)]
|
||||
#[gpu_image]
|
||||
over: T,
|
||||
#[expose]
|
||||
#[implementations(
|
||||
@@ -149,6 +150,7 @@ fn blend<T: Blend<Color> + Send>(
|
||||
Table<GradientStops>,
|
||||
GradientStops,
|
||||
)]
|
||||
#[gpu_image]
|
||||
under: T,
|
||||
blend_mode: BlendMode,
|
||||
#[default(100.)] opacity: PercentageF32,
|
||||
@@ -165,6 +167,7 @@ fn color_overlay<T: Adjust<Color>>(
|
||||
Table<GradientStops>,
|
||||
GradientStops,
|
||||
)]
|
||||
#[gpu_image]
|
||||
mut image: T,
|
||||
#[default(Color::BLACK)] color: Color,
|
||||
blend_mode: BlendMode,
|
||||
|
||||
Reference in New Issue
Block a user