`MeshRenderPlugin` should be usable as a standalone plugin.
- Lenguaje dominante
- Rust
- Estrellas
- 48.2k
- Forks
- 4.8k
- Merge medio
- 3 d 15 h
- PR fusionados (30 d)
- 168
Descripción
## 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.
Guía de contribución
Línea de trabajo
Comienza reproduciendo la configuración no-pbr usando MeshRenderPlugin y el panic informado; después, inspecciona la ruta de renderizado de mallas en torno al parámetro de sistema RenderLightmaps que falta. Compara esto con los ejemplos SpecializedRenderPipeline y specialized_mesh_pipeline.rs. Se considera terminado cuando MeshRenderPlugin pueda ejecutarse como un renderizador de mallas independiente sin requerir la feature pbr.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- computer-graphics, game-dev
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100