`MeshRenderPlugin` should be usable as a standalone plugin.
- Lingua principale
- Rust
- Stelle
- 48.2k
- Fork
- 4.8k
- Merge medio
- 3g 16h
- PR unite (30g)
- 171
Descrizione
## 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo la configurazione no-pbr usando MeshRenderPlugin e il panic segnalato, quindi esamina il percorso di rendering delle mesh intorno al parametro di sistema RenderLightmaps mancante. Confronta questo con gli esempi SpecializedRenderPipeline e specialized_mesh_pipeline.rs. Il lavoro è completato quando MeshRenderPlugin può essere eseguito come renderer di mesh autonomo senza richiedere la feature pbr.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- computer-graphics, game-dev
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100