* Laid groundwork for per-stroke brush parameters.
* Added new spacing parameter.
* Added back interpolation, using spacing parameter.
* Move bounding box code into core.
* Initial working prototype of per-stroke styles.
* Removed now useless brush node properties.
* Made default spacing 50% for performance comparison.
* Quick and dirty prototype for BlitNode copied from blend.
* Fixed error after rebase.
* Optimized the blitting loop.
* Pretty big optimization for into_flat_u8.
* Insert brush node for images
* Fix starting position transform
* UX polish
* Code review nits
---------
Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Web gpu execution MVP
Ready infrastructure for wgpu experimentation
Start implementing simple gpu test case
Fix Extract Node not working with nested networks
Convert inputs for extracted node to network inputs
Fix missing cors headers
Feature gate gcore to make it once again no-std compatible
Add skeleton structure gpu shader
Work on gpu node graph output saving
Fix Get and Set nodes
Fix storage nodes
Fix shader construction errors -> spirv errors
Add unsafe version
Add once cell node
Web gpu execution MVP
* Make node graph execution async
Make node macro generate async node implementations
Start propagating async through the node system
Async checkpoint
Make Any<'i> Send + Sync
Determine node io type using panic node
Fix types for raster_node macro
Finish porting node registry?
Fix lifetime errors
Remove Send + Sync requirements and start making node construction async
Async MVP
Fix tests
Clippy fix
* Fix nodes
* Simplify lifetims for node macro + make node macro more modular
* Reenable more nodes
* Fix pasting images
* Remove http test from brush node
* Fix output type for cache node
* Fix types for let scope
* Fix formatting
* Thumbnails for the layer node
* Raster node graph frames
* Downscale to a random resolution
* Cleanup and bug fixes
* Generate paths before duplicating outputs
* Fix stable id test
* Add a document node graph
* Fix merge conflict
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add Channel Extrataction Node
* Add hacky BlendModes for Inserting Color Channels
* Fix Channel Exporter
* Add Monochrome Option and Multi Output Node
* Fix Input Mapping
* Fix Formatting
* Split Alpha Extraction to seperate node
* Remove unnecessary functionality
* Add Alpha Channel as an output to the extract channel node
* Fix compilation
* Add unpolished 'Combine Channels' Node
* Fix Rebasing Issues
* Add a bit of polish
* Fix Rebase Issues
* Switch from 'ColorChannel' to 'RedGreenBlue'
I initially added an enum to hold color channels called 'ColorChannel', but while implementing the nodes, there somebody allready added a similar enum so I switched to that type
* Add correct names
* Add Improvement
- Some Performance Improvements
- Some Formatting Improvements
* Add some improvements
Most of this stuff was done by TrueDoctor in my Luchbreak :D
* Implement IO Improvements
- Converted primary output from split node to a dummy output
- Removed primary Input from split node
* Fix Formatting
* Fix Combine RGB Node (hopefully final :D )
* Swap around Inputs and Outputs
Move from ARGB -> RGBA
* Improve naming
* More naming fixes
* Fix Replace -> Into
* Rename Replacment -> Insertion
* Add blank assist area
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
* Thumbnails for the layer node
* Raster node graph frames
* Downscale to a random resolution
* Cleanup and bug fixes
* Generate paths before duplicating outputs
* Fix stable id test
* Code review changes
* Code review pass with minor changes
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Implement Infrastructuro to reuse the previous evaluation of the
node graph to blend the new stroke with instead of drawing the
entire trace from scratch.
This does not transition to a blending based approach because that still
caused regressions but allows the brush node to work with input data
natively.
Test Plan:
- Use the brush tool in the editor and check for regressions
- Evaluate the performance
Reviewers: Keavon
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1190
* Add basic layout - WIP
* Add color input min-width -> 80px
* First pass implementation - WIP
* Allow fill to be None
* Fix null Fill color
* refactor fill and stroke options into struct
* toolbar progress - WIP
* Switch is_working_color bool to PenColorType enum
* Add todo
* Add WorkingColorChanged event
* remove unused import
* Add WorkingColor[Primary/Secondary] icons
* Allow new strokes to have no color
* Set to base color when X is pressed (as per req)
* Improve icons for new UI layout design
* Add radio buttons
* Fix menu bar Edit12px -> Edit
* Add tooltips to radio buttons
* Make the color selector only on custom
* Fix edit icon correctly this time (whoops)
* Fix working colors icons
* Changes to improve the UX
* Remove lines obviated by Default::default()
* Make Eyedropper tool use working_color_changed event
* Fix tests
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Add the node path to the document node and carry that over to the proto
nodes which are generated from that.
This pr also adds a compiler pass to assign the paths based on the
hierarchical structure of the nodegraph.
Test Plan: - Run units tests which check the path propagation works
Reviewers: Keavon
Reviewed By: Keavon
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1181
* Initial work towards text to node
* Add the text generate node
* Implement live edit
* Fix merge error
* Cleanup text tool
* Implement text
* Fix transforms
* Fix broken image frame
* Double click to edit text
* Fix rendering text on load
* Moving whilst editing
* Better text properties
* Prevent changing vector when there is a Text node
* Push node api
* Use node fn macro
* Stable ids
* Image module as a seperate file
* Explain check for "Input Frame" node
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Adds a `serialize` function on Node which can be implemented by nodes to
allow introspecting their content. This pr also adds a Monitor Node that
always caches the last value it was evaluated with.
Test Plan: -
Reviewers: 0HyperCube
Reviewed By: 0HyperCube
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1165
Split function into smaller non-inlinable ones
this fixes the issue that rust creates too many wasm locals in non-optimized
builds. That lead to a compile error in such builds.
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Start implementing GpuExecutor for wgpu
* Implement read_output_buffer function
* Implement extraction node in the compiler
* Generate type annotations during shader compilation
* Start adding node wrapprs for graph execution api
* Wrap more of the api in nodes
* Restructure Pipeline to accept arbitrary shader inputs
* Adapt nodes to new trait definitions
* Start implementing gpu-compiler trait
* Adapt shader generation
* Hardstuck on pointer casts
* Pass nodes as references in gpu code to avoid zsts
* Update gcore to compile on the gpu
* Fix color doc tests
* Impl Node for node refs
* Add the Channel Mixer node
* Fix NodeIdentifier not found in Registry
* Add radio toggle for red/green/blue
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
* Nudging is now based on local pixel dimensions
* Brush tool live preview (#1116)
* Disable vector preview for brush tool
* Fix brush preview
* Fix warping
* Left and right square brackets to change size
* Add linear interpolation
* Modfiy existing selected brush layer
* Resolve warnings
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Duplicating a layer selects only new layer
* Add Ctrl+J duplicate alias hotkey
---------
Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>