-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Gizmos Billboards #14995
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
base: main
Are you sure you want to change the base?
Gizmos Billboards #14995
Conversation
Very nice: thanks for the polished video! |
@lynn-lumen what needs to be done here to take this out of draft? |
I don' really understand the ambiguity error🥲 |
It looks like you've added some ambiguous systems. The diff of "what new systems are conflicting" is frustratingly annoying to get at though: I'm going to be spending some time today driving the count down to zero, which should make this much clearer. |
Thanks, I will have another try tomorrow :) |
@alice-i-cecile This is ready for review now :) |
|
||
@vertex | ||
fn vertex(vertex: VertexInput) -> VertexOutput { | ||
var positions = array<vec2<f32>, 6>( |
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.
please format this shader fn
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.
I'm not really sure what you mean. In terms of formatting it looks like the lines.wgsl
shader to me.
@lynn-lumen @tychedelia what is required to move this PR forward? |
This PR probably needs updating to the current version. Apart from that, I am not aware of anything blocking this PR. I believe @tychedelia requested format changes to some of the shader code though, but I was unable to determine what exactly they meant. |
Line 43 and 76-79 aren't formatted. The conflicts might be complex to resolve. We've moved towards retaining gizmos which may be worth evaluating if you want to revive this. |
Ahh OK, thank you for clarifying :) If there still is interest, I will take a look at updating this next week. |
Objective
Solution
gizmos.billboard(position_3d, color)
andgizmos.billboard_2d(position_2d, color)
to actually draw gizmos.GizmoConfig
now includes two additional properties:.billboard_size
to configure the visual size (length along the edge) of billboards. This behaves very similar to.line_width
.billboard_perspective
to apply perspective scaling to billboards.GizmoConfig.depth_bias
applies to billboards aswell.Showcase
You can draw billboards like this:
Which produces results like these...
in 3D:
Screen.Recording.2024-08-31.at.19.31.14-2.mov
and in 2D: