Browse Source

Update CreatingNode.md

flabbet 1 year ago
parent
commit
658d168a3e

+ 3 - 4
src/PixiEditor.ChangeableDocument/Changeables/Graph/Nodes/CreatingNode.md

@@ -3,10 +3,11 @@
 This is a guide that will help with writing new nodes and will help
 This is a guide that will help with writing new nodes and will help
 with solving common problems that may occur during the process.
 with solving common problems that may occur during the process.
 
 
-
 # Creating shader nodes
 # Creating shader nodes
 
 
-
+1. Each node needs to inherit from `Node` class
+2. Each node class needs `NodeInfoAttribute` with Unique Name and Display name, display name should be localized, unique name should be unique across all nodes.
+3. Node inputs are serialized and therefore any input should have a proper SerializationFactory class, otherwise saving fails.
 
 
 # Important notes
 # Important notes
 
 
@@ -14,5 +15,3 @@ with solving common problems that may occur during the process.
 Creating new textures without managing them properly will lead to memory leaks, performance issues, visual glitches and unexpected crashes.
 Creating new textures without managing them properly will lead to memory leaks, performance issues, visual glitches and unexpected crashes.
 
 
 Use `RequestTexture` method, it handles node texture caching and management.
 Use `RequestTexture` method, it handles node texture caching and management.
-
-2. For the love of god, do not enumerate over pixels in a loop unless it's absolutely necessary. Create a proper shader builder instead.