@@ -14,6 +14,7 @@ use graph_craft::ProtoNodeIdentifier;
14
14
use graph_craft:: concrete;
15
15
use graph_craft:: document:: value:: * ;
16
16
use graph_craft:: document:: * ;
17
+ use graphene_core:: application_io:: TextureFrameTable ;
17
18
use graphene_core:: raster:: brush_cache:: BrushCache ;
18
19
use graphene_core:: raster:: image:: ImageFrameTable ;
19
20
use graphene_core:: raster:: { CellularDistanceFunction , CellularReturnType , Color , DomainWarpType , FractalType , NoiseType , RedGreenBlueAlpha } ;
@@ -1850,6 +1851,91 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
1850
1851
description: Cow :: Borrowed ( "TODO" ) ,
1851
1852
properties: None ,
1852
1853
} ,
1854
+ #[ cfg( feature = "gpu" ) ]
1855
+ DocumentNodeDefinition {
1856
+ identifier: "GPU Invert" ,
1857
+ category: "Debug: GPU" ,
1858
+ node_template: NodeTemplate {
1859
+ document_node: DocumentNode {
1860
+ implementation: DocumentNodeImplementation :: Network ( NodeNetwork {
1861
+ exports: vec![ NodeInput :: node( NodeId ( 2 ) , 0 ) ] ,
1862
+ nodes: [
1863
+ DocumentNode {
1864
+ inputs: vec![ NodeInput :: scope( "editor-api" ) ] ,
1865
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "graphene_core::ops::IntoNode<&WgpuExecutor>" ) ) ,
1866
+ ..Default :: default ( )
1867
+ } ,
1868
+ DocumentNode {
1869
+ inputs: vec![ NodeInput :: network( concrete!( TextureFrameTable ) , 0 ) , NodeInput :: node( NodeId ( 0 ) , 0 ) ] ,
1870
+ manual_composition: Some ( generic!( T ) ) ,
1871
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "wgpu_executor::gcore_shader_nodes::GpuInvertNode" ) ) ,
1872
+ ..Default :: default ( )
1873
+ } ,
1874
+ DocumentNode {
1875
+ manual_composition: Some ( generic!( T ) ) ,
1876
+ inputs: vec![ NodeInput :: node( NodeId ( 1 ) , 0 ) ] ,
1877
+ implementation: DocumentNodeImplementation :: ProtoNode ( ProtoNodeIdentifier :: new( "graphene_core::memo::ImpureMemoNode" ) ) ,
1878
+ ..Default :: default ( )
1879
+ } ,
1880
+ ]
1881
+ . into_iter( )
1882
+ . enumerate( )
1883
+ . map( |( id, node) | ( NodeId ( id as u64 ) , node) )
1884
+ . collect( ) ,
1885
+ ..Default :: default ( )
1886
+ } ) ,
1887
+ // experimentally determined to work
1888
+ inputs: vec![ NodeInput :: value( TaggedValue :: None , true ) ] ,
1889
+ // inputs: vec![NodeInput::value(TaggedValue::TextureFrame(TextureFrameTable::default()), true)],
1890
+ // inputs: vec![],
1891
+ // inputs: vec![NodeInput::network(concrete!(TextureFrameTable), 0)],
1892
+ ..Default :: default ( )
1893
+ } ,
1894
+ persistent_node_metadata: DocumentNodePersistentMetadata {
1895
+ input_properties: vec![ ( "In" , "TODO" ) . into( ) ] ,
1896
+ output_names: vec![ "Texture" . to_string( ) ] ,
1897
+ network_metadata: Some ( NodeNetworkMetadata {
1898
+ persistent_metadata: NodeNetworkPersistentMetadata {
1899
+ node_metadata: [
1900
+ DocumentNodeMetadata {
1901
+ persistent_metadata: DocumentNodePersistentMetadata {
1902
+ display_name: "Extract Executor" . to_string( ) ,
1903
+ node_type_metadata: NodeTypePersistentMetadata :: node( IVec2 :: new( 0 , 0 ) ) ,
1904
+ ..Default :: default ( )
1905
+ } ,
1906
+ ..Default :: default ( )
1907
+ } ,
1908
+ DocumentNodeMetadata {
1909
+ persistent_metadata: DocumentNodePersistentMetadata {
1910
+ display_name: "Upload Texture" . to_string( ) ,
1911
+ node_type_metadata: NodeTypePersistentMetadata :: node( IVec2 :: new( 7 , 0 ) ) ,
1912
+ ..Default :: default ( )
1913
+ } ,
1914
+ ..Default :: default ( )
1915
+ } ,
1916
+ DocumentNodeMetadata {
1917
+ persistent_metadata: DocumentNodePersistentMetadata {
1918
+ display_name: "Cache" . to_string( ) ,
1919
+ node_type_metadata: NodeTypePersistentMetadata :: node( IVec2 :: new( 14 , 0 ) ) ,
1920
+ ..Default :: default ( )
1921
+ } ,
1922
+ ..Default :: default ( )
1923
+ } ,
1924
+ ]
1925
+ . into_iter( )
1926
+ . enumerate( )
1927
+ . map( |( id, node) | ( NodeId ( id as u64 ) , node) )
1928
+ . collect( ) ,
1929
+ ..Default :: default ( )
1930
+ } ,
1931
+ ..Default :: default ( )
1932
+ } ) ,
1933
+ ..Default :: default ( )
1934
+ } ,
1935
+ } ,
1936
+ description: Cow :: Borrowed ( "TODO" ) ,
1937
+ properties: None ,
1938
+ } ,
1853
1939
DocumentNodeDefinition {
1854
1940
identifier: "Extract" ,
1855
1941
category: "Debug" ,
0 commit comments