Repository navigation
3D strokes, vertex baking and draw pooling. - #295
Open
tychedelia wants to merge 4 commits into
Open
tychedelia wants to merge 4 commits into
tychedelia wants to merge 4 commits into
Conversation
tychedelia
force-pushed
the
strokes-3d
branch
2 times, most recently
from
November 30, 2026 21:54
0ae85ef to
073d187
Compare
tychedelia
force-pushed
the
strokes-3d
branch
from
November 30, 2026 21:58
073d187 to
bf3a668
Compare
tychedelia
force-pushed
the
strokes-3d
branch
from
November 30, 2026 22:02
bf3a668 to
08fe97a
Compare
Merged
tychedelia
force-pushed
the
strokes-3d
branch
from
November 30, 2026 22:12
08fe97a to
69cef16
Compare
tychedelia
force-pushed
the
strokes-3d
branch
from
November 30, 2026 22:13
69cef16 to
8b49a27
Compare
|
Visual regression: 1 changed, 2 new of 45 cases
If these changes are intentional, add the baseline |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow up to the previous PR that moves the rest of our strokes onto the new line renderer, plus some perf work I found that fell out of it.
On perf - we were spawning and despawning an entity for every draw every frame. Draws are pooled now and reuse their entities, and materials and primitive meshes are cached. This is something I've avoided in the past as it adds a lot of complexity but it does appear to yield pretty massive performance wins under certain circumstances.
Relatedly - fill color for primitives is passed per instance through the mesh tag instead of making a new material per color. We read the tag in the vertex shader and multiply it into the vertex color, which means we carry our own copy ofBevy's mesh vertex shader with a small patch.
Because the fill arrives as the vertex color, custom materials get it too now. Previously a custom shader just ignored
fill(). A custom shader can still ignore it, but if you read the vertex color it'll work. Addsprocessing::meshshader module so you can write a custom vertex shader.Misc:
line()andpoint()take a z.hint(ENABLE_STROKE_PERSPECTIVE)for strokes sized in world units.Stack created with GitHub Stacks CLI • Give Feedback 💬