Retained/Fine Granular Mode (Beta) #666
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is something that i've been working in #gpu > (Showcase) Vello Retained/Fine Granular Mode WIP. But i'll explain in short sentences what is it, what does it do, what doesn't do yet, and why.
What is it?
The Retained/Fine Granular Mode is a system that allows you to modify already existing shapes without having to reset the entire scene, allowing you to:
What does it do?
This mode allows for
fill()
andstroke()
to return what's called anIndex
, which is a struct that contains information about where your shape is in the encoder.Then you can use this information to modify its transform, its style, its brush, etc. via:
Without having to reset the scene.
Does having this mode requires to modify examples or already existing code powered by Vello?
Nope! You can still run and use Vello like you usually do. In fact, you can switch between Normal and Retained Mode at any time without any compromises! There's no need for you to write Retained Mode code if you don't want to.
What doesn't do yet?
fill()
orstroke()
in Retained Mode.To make these 4 items happen, it will require more investigation in the encoder, and a proposal that i'm working on.
Why?
Well, for two reasons: