`MeshRenderPlugin` should be usable as a standalone plugin.
- Langage dominant
- Rust
- Étoiles
- 48.2k
- Forks
- 4.8k
- Merge moyen
- 3 j 15 h
- PR mergées (30 j)
- 168
Description
## What problem does this solve or what need does it fill?
`bevy_pbr` takes a very long time to compile on my computer, because of the shaders that must be internally compiled. I wanted to write my own shaders, so I have experimented with:
- [`SpecializedRenderPipeline`](https://github.com/bevyengine/bevy/blob/main/examples/shader/custom_phase_item.rs)
- [this example about specialized Mesh](https://github.com/bevyengine/bevy/blob/release-0.15.1/examples/shader/specialized_mesh_pipeline.rs)
- reading [this issue](https://github.com/bevyengine/bevy/discussions/9160)
I ended up forking `bevy_pbr` to explore what's possible.
Since `MeshRenderPlugin` is defined in this crate, I tried to use it without the `pbr` feature, because I only wanted the basic mesh rendering part.
But unfortunately, it does not work. I get an error, and after trying to fix it I think it's pretty deep.
```
Running `target/debug/rust-geometry`
2025-01-25T16:17:14.869514Z INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) UHD Graphics 620 (WHL GT2)", vend
or: 32902, device: 16032, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 24.2.8
", backend: Vulkan }
2025-01-25T16:17:15.562926Z INFO bevy_winit::system: Creating new window "App" (0v1#4294967296)
2025-01-25T16:17:15.563472Z INFO winit::platform_impl::linux::x11::window: Guessed window scale factor: 1
thread 'main' panicked at /home/rambip/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.15.1/src/system/f
unction_system.rs:216:28:
bevy_render::batching::no_gpu_preprocessing::batch_and_prepare_binned_render_phase could not access system parameter Res
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
## What solution would you like?
I don't really know what the solution is, but I feel like the user should be able to use a mesh rendering plugin without all the pbr features.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire la configuration no-pbr à l’aide de MeshRenderPlugin et le panic signalé, puis examinez le chemin de rendu des maillages autour du paramètre système RenderLightmaps manquant. Comparez cela avec les exemples SpecializedRenderPipeline et specialized_mesh_pipeline.rs. Le travail est terminé lorsque MeshRenderPlugin peut s’exécuter comme renderer de maillages autonome sans nécessiter la feature pbr.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- rust
- Domaine
- computer-graphics, game-dev
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100