* Create artboard nodes
* Update node when resizing artboard
* Render clipped artboards
* More stable feature
* Do not render old artboards
* Fix some issues with transforms
* Fix crash when drawing rectangle
* Format
* Allow renaming document from Properties panel
* Adjust artboard label styling
* Fix document graph refresh so artboards show up
* Make "Clear Artboards" coming soon
* Fix displaying an infinite canvas
* Show document name in node graph options bar
* info!() to debug!()
* Fix Properties panel not being cleared when all docs closed
* Remove dead code
* Remove debug logs added in this branch
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Implement skeleton for graphene-cli
* Configure gpu surface on non wasm32 targets
* Create window with full hd size
* Create window using the graphen-cli
* Use window size for surface creation
* Reuse surface configuration
* Reduce window size for native applications to 800x600
* Add compute pipeline test
* Poll wgpu execution externally
* Remove cache node after texture upload
* Add profiling instructions
* Add more debug markers
* Evaluate extract node before flattening the network
* Reenable hue saturation node for compilation
* Make hue saturation node work on the gpu + make f32 default for user inputs
* Add version of test files without caching
* Only dispatch each workgroup not pixel
* ICE
* Add quantization to gpu code
* Fix quantization
* Load images at graph runtime
* Fix quantization calculation
* Feature gate quantization
* Use git version of autoquant
* Add license to `graphene-cli`
* Fix graphene-cli test case
* Ignore tests on non unix platforms
* Fix flattening test
* WebGPU: Switch from `rgba8unorm` to `bgra8unorm` to support MacOS
This is a known issue in the Dawn bug database: https://bugs.chromium.org/p/chromium/issues/detail?id=1298618
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Undo the modification to `shader.wgsl`
Apparently I didn't need to modify the order of the channels in
the shader.
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Create asynchronous rust imaginate node
* Make a first imaginate request via rust
* Implement parsing of imaginate API result image
* Stop refresh timer from affecting imaginate progress requests
* Add cargo-about clarification for rustls-webpki
* Delete imaginate.ts and all uses of its functions
* Add imaginate img2img feature
* Fix imaginate random seed button
* Fix imaginate ui inferring non-custom resolutions
* Fix the imaginate progress indicator
* Remove ImaginatePreferences from being compiled into node graph
* Regenerate imaginate only when hitting button
* Add ability to terminate imaginate requests
* Add imaginate server check feature
* Do not compile wasm_bindgen bindings in graphite_editor for tests
* Address some review suggestions
- move wasm futures dependency in editor to the future-executor crate
- guard wasm-bindgen in editor behind a `wasm` feature flag
- dont make seed number input a slider
- remove poll_server_check from process_message function beginning
- guard wasm related code behind `cfg(target_arch = "wasm32")` instead
of `cfg(test)`
- Call the imaginate idle states "Ready" and "Done" instead of "Nothing
to do"
- Call the imaginate uploading state "Uploading Image" instead of
"Uploading Input Image"
- Remove the EvalSyncNode
* Fix imaginate host name being restored between graphite instances
also change the progress status texts a bit.
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add Texture handle type
* Add Texture View to shader inputs
* Implement basic rendering pipeline
* Render first texture using render pipeline
* Fix output color space
* Precompute the rendering pipeline
* Move gpu context creation to editor api
* Port gpu-executor nodes to node registry
* Fix canvas nodes and make code compile for non wasm targets
* Pin wasm-bindgen version
* Disable miri temoporarily for better ci times
* Fix formatting
* Remove unsafe block
* Bump wasm-pack version
* Bump wasm-bindgen version
* Add gpu feature guard for push node
* Make Into node async
* Reorganize file structure
* Remove all unsafe code
* Add testcase for debugging ub
* Convert into proper test with fail condition
* General cleanup
* Fix tests
* Add feature guard for deallocation
* Use raw pointer for storing values to avoid violating aliasing rules
* Add comment explaining the disabling of simd128
* Fix brush node
* Fix formatting
* Remove unsafe code
* Make node graph test syncronous
* Add miri step to ci
* Remove unsafe from node graph evaluation
* Replace operation pseudo_hash with hash based on discriminant
* Fix test
* Move memo module to core and make it safe
* Fix formatting
* Remove unused stuff from gstd
* Use safe casting for creating key variants
* Fix memo node types
* Fix ref node
* "fix" ub
* Use correct input types for ExtractImageFrame
* Fix types for async nodes
* Fix missing implementation
* Manually override output type for async nodes
* Fix types for EditorApi
* Fix output type for WasmSurfaceHandle
* Remove unused miri.yml
* Fix incorrect type for cache node
* 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>