-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gizmo line joints #12252
Gizmo line joints #12252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was what I was expecting from this feature. Though I'm not sure about the rendering part, I have a couple of maybe silly questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The render phase was a bit tricky, but everything right. There is a couple of things in other places that could improve IMO
Co-authored-by: Pablo Reinhardt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, LGTM
The CI error looks like a external error, not related to this PR. I'll have a better look now just to make sure though. |
#12254 found the source of the error. I think you have to use bevy_utils for this now. |
# Objective The changes made in #12252 introduced an previously fixed bug in webgpu rendering. ## Solution This fix is based on #8910 and applies the same vertex buffer layout assignment for the LineGizmo Pipeline. ## Testing - Tested the 3D Gizmo example in webgpu and webgl environments Co-authored-by: Alice Cecile <[email protected]>
# Objective The changes made in #12252 introduced an previously fixed bug in webgpu rendering. ## Solution This fix is based on #8910 and applies the same vertex buffer layout assignment for the LineGizmo Pipeline. ## Testing - Tested the 3D Gizmo example in webgpu and webgl environments Co-authored-by: Alice Cecile <[email protected]>
Objective
Solution
line_joints: GizmoLineJoint
toGizmoConfig
. Currently the following values are supported:GizmoLineJoint::None
: does not draw line joints, same behaviour as previouslyGizmoLineJoint::Bevel
: draws a single triangle between the linesGizmoLineJoint::Miter
/ 'spiky joints': draws two triangles between the lines extending them until they meet at a (miter) point.GizmoLineJoint::Round(resolution)
: Draw a circle arc between the lines. The circle is a triangle fan ofresolution
triangles.Changelog
GizmoLineJoint
, use that inGizmoConfig
and added necessary pipelines and draw commands.line_joints.wgsl
shader containing three vertex shadersvertex_bevel
,vertex_miter
andvertex_round
as well as a basicfragment
shader.Migration Guide
Any manually created
GizmoConfig
s must now set the.line_joints
field.Known issues
Additional information
Some pretty images :)
Now for a weird video:
Screen.Recording.2024-03-02.at.05.14.23.mov