bevy_pbr
bevy_pbr is Bevy’s Physically Based Rendering crate. It provides the standard material system, PBR shaders, lighting, shadow maps, and the rendering pipeline for opaque and transmissive materials.
Role in Bevy’s architecture
- Implements
PbrPlugin— the main rendering plugin that sets up the PBR pipeline - Provides
StandardMaterial— the primary material component used by most mesh entities - Contains the PBR shader (WGSL) that runs the lighting and material computation on GPU
- Manages extracted lights, shadow maps, and material bind groups in the render world
- Provides
MeshMaterial3d<M>component for attaching materials to 3D meshes
Recent fixes landing in this crate
0.19 Release Highlights (Jun 19, 2026)
Bevy 0.19 对 PBR 渲染带来了多项重大新功能和修复,来自官方发布博文:
| 特性 | PR | 作者 | 说明 |
|---|---|---|---|
| Contact Shadows | #22382 | aevyrie | 屏幕空间短距离 raycast 补充 shadow map,解决 peter-panning / shadow acne |
| Physically Based SSR | #22379 | aevyrie | 屏幕空间反射升级为基于物理的算法 |
| Rectangular Area Lights | #23288 | dylansechet | LTC 方法实现矩形面光源(无阴影、无各向异性) |
| Parallax Corrected Cubemaps | #22582 | pcwalton | 立方体贴图反射视差校正,默认启用 |
| White Furnace Test Fix | #23194, #23203 | dylansechet | 修复 PBR shader 能量不守恒,通过白炉测试 |
| Partial Bindless | #23436 | holg | Metal 部分支持纹理绑定数组,Bistro 场景帧时间 +15%~+46% |
| Improved Skinned Mesh Culling | #21837 | greeble-dev | 基于实际关节位置的动态 bounds,修复动画中模型消失 |
| Solari Improvements | 11 PRs | JMS55, dylansechet | 镜面、非金属、时间稳定性、性能 |
2026-06-03
| PR | Fix | Impact |
|---|---|---|
| #24514 | Propagate glTF clearcoat texture to StandardMaterial | glTF ClearCoat partial coating now renders correctly. +4 lines in glTF loader.^[raw/articles/bevy-pr-24514-clearcoat-texture.md] |
| #24453 | Scale transmission roughness by IOR | Physically correct transmission blur. Shader change.^[raw/articles/bevy-pr-24453-transmission-roughness-ior.md] |
| #24365 | Respect AUTOMATIC_BATCHING=false in GPU preprocessing | Fixes Transmissive3d batching bug. Critical for ordered rendering phases.^[raw/articles/bevy-pr-24365-gpu-batching-bugfix.md] |
| #24573 | Fix bindless specular_transmission material lookup | Bindless path incorrectly read material index; +2/-1 fix. Discovered during KHR_materials_dispersion work.^[raw/articles/bevy-pr-24573-bindless-transmission-fix.md] |
2026-05 (selected)
- #24289 — Shadow visibility range fix (
ShadowLodOrigincomponent, by pcwalton) - #24343 — GPU-driven HLOD evaluation re-applied (pcwalton)
- #24199 — Fix stale directional light shadow map caching (JMS55)
- #23982 — Mesh view bind group layout on demand for WebGL2 (beicause)
Key rendering features
- Opaque pass: standard forward+ rendering for solid surfaces
- Transmissive pass: screen-space transmission for glass/water materials (ordered chunks via
ScreenSpaceTransmission.steps) - Prepass: depth + normal + motion vectors for TAA/motion blur
- Shadow maps: directional, point, spot light shadows with cascades
- Clearcoat: thin transparent coating layer (uses a second specular lobe)
- GPU-driven HLOD: visibility range culling + automatic LOD selection (0.19+)
Feature flags
The crate is behind the bevy_pbr feature (enabled by default in bevy). Without it, 2D-only or custom rendering apps can omit the PBR dependency. However, components like RenderShadowLodOrigin may cause crashes if bevy_pbr is omitted — see #24359 for the fix.
Related pages
- standard-material — the material component provided by bevy_pbr
- clearcoat — PBR clearcoat concept
- transmission — PBR transmission concept
- bevy-rendering — Bevy rendering system overview
- bevy — Bevy engine entity hub