Add the first basic version of the GPU blend node (#1243)

* Implement Gpu Blend node

* Remove duplicate shader input

* Fix formatting

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
Alexandru Ică 2023-05-28 11:34:09 +03:00 committed by Keavon Chambers
parent 9da83d3280
commit 57415b948b
14 changed files with 369 additions and 67 deletions

View file

@ -723,6 +723,20 @@ fn static_nodes() -> Vec<DocumentNodeType> {
outputs: vec![DocumentOutputType::new("Image", FrontendGraphDataType::Raster)],
properties: node_properties::no_properties,
},
#[cfg(feature = "gpu")]
DocumentNodeType {
name: "Blend (GPU)",
category: "Image Adjustments",
identifier: NodeImplementation::proto("graphene_std::executor::BlendGpuImageNode<_, _, _>"),
inputs: vec![
DocumentInputType::value("Image", TaggedValue::ImageFrame(ImageFrame::empty()), true),
DocumentInputType::value("Second", TaggedValue::ImageFrame(ImageFrame::empty()), true),
DocumentInputType::value("Blend Mode", TaggedValue::BlendMode(BlendMode::Normal), false),
DocumentInputType::value("Opacity", TaggedValue::F32(100.0), false),
],
outputs: vec![DocumentOutputType::new("Image", FrontendGraphDataType::Raster)],
properties: node_properties::blend_properties,
},
DocumentNodeType {
name: "Extract",
category: "Macros",