bevy/crates/bevy_gizmos
Antonin Peronnet b574599444
don't use bevy_pbr for base bevy_gizmos plugin (#17581)
# Objective

This PR enables `bevy_gizmos` to be used without `bevy_pbr`, for user
who want to create their custom mesh rendering logic.

It can also be useful for user who just want to use bevy for drawing
lines (why not).

This work is part of a bigger effort to make the bevy rendering pipeline
more modular. I would like to contribute an exemple to render custom
meshes without `bevy_pbr`. Something like
[this](https://github.com/rambip/plant-mesh/blob/main/src/shader/mod.rs)

## Solution

Now, `bevy_pbr` is an optional dependency, and used only to debug
lights.

I query the `ViewUniforms` manually, instead of using `bevy_pbr` to get
the heavy `MeshViewLayout`

## Testing

I'm not used to testing with bevy at all, but I was able to use
successfully in my project.
It might break for some different mesh pipelines, but I don't think so.

---

## Showcase


![image](https://github.com/user-attachments/assets/7fa22d1c-8b4f-456b-a74b-1a579449e9f5)
So nice ...

## Migration Guide

I don't think there is any breaking change


# Remaining work

Before merging it, it would be useful to:
- rewrite the `pipeline_2d.rs` logic to remove the `bevy_sprite`
depedency too
- move `view.rs` to `bevy_render`, so that it can be used in a more
modular way.
~~- include the most recent changes from 0.16~~

---------

Co-authored-by: IceSentry <IceSentry@users.noreply.github.com>
2025-03-10 21:16:52 +00:00
..
macros Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
src don't use bevy_pbr for base bevy_gizmos plugin (#17581) 2025-03-10 21:16:52 +00:00
Cargo.toml don't use bevy_pbr for base bevy_gizmos plugin (#17581) 2025-03-10 21:16:52 +00:00
LICENSE-APACHE Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
LICENSE-MIT Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Gizmos

License Crates.io Downloads Docs Discord