-
-
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
Add Wireframe2d plugin #10489
Add Wireframe2d plugin #10489
Conversation
Fixed this problem by applying a depth bias with a new |
a0079ea
to
c3067d6
Compare
c3067d6
to
e1359d6
Compare
# Objective It is currently impossible to control the relative ordering of two 2D materials at the same depth. This is required to implement wireframes for 2D meshes correctly (#5881). ## Solution Add a `Material2d::depth_bias` function that mirrors the existing 3D `Material::depth_bias` function. (this is pulled out of #10489) --- ## Changelog ### Added - Added `Material2d::depth_bias` ## Migration Guide `PreparedMaterial2d` has a new `depth_bias` field. A value of 0.0 can be used to get the previous behavior.
added basic mesh display + copied `colored_mesh2d` shader from example + tried wireframe plugin but not working with 2D: bevyengine/bevy#10489
This looks quite sound, and quite useful, for example if one is trying to draw roads in 2D, and wanna figure out why their meshes are not meshing I rebased it and you can find the rebase here: https://github.com/TotalKrill/bevy/tree/wireframe2d |
There's also #12135 now, which has more maintainer attention, so that'll probably be merged instead |
Look at that wish I had known, could have saved me some minutes, maybe close this one then, to help declutter |
Objective
Solution
bevy_pbr
andbevy_sprite
, and let them share code and types. Opinions welcome!Changelog
Added
Wireframe2d
plugin for drawing 2D meshes as wireframes.