Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/bevy_pbr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ pub struct PbrPlugin {
pub use_gpu_instance_buffer_builder: bool,
/// Debugging flags that can optionally be set when constructing the renderer.
pub debug_flags: RenderDebugFlags,
/// Renders GLTFs with PBR.
pub gltf_render_enabled: bool,
/// Builds and inserts `StandardMaterial` when loading glTF files
pub gltf_enable_standard_materials: bool,
}

impl Default for PbrPlugin {
Expand All @@ -150,7 +150,7 @@ impl Default for PbrPlugin {
add_default_deferred_lighting_plugin: true,
use_gpu_instance_buffer_builder: true,
debug_flags: RenderDebugFlags::default(),
gltf_render_enabled: true,
gltf_enable_standard_materials: true,
}
}
}
Expand Down Expand Up @@ -224,7 +224,7 @@ impl Plugin for PbrPlugin {
))
.add_plugins((ScatteringMediumPlugin, AtmospherePlugin));

if self.gltf_render_enabled {
if self.gltf_enable_standard_materials {
gltf::add_gltf(app);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/gltf/gltf_extension_mesh_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() {
.add_custom_vertex_attribute("_BARYCENTRIC", ATTRIBUTE_BARYCENTRIC),
)
.set(PbrPlugin {
gltf_render_enabled: false,
gltf_enable_standard_materials: false,
..Default::default()
}),
GltfToMesh2dPlugin,
Expand Down
2 changes: 1 addition & 1 deletion release-content/migration-guides/gltf_pbr.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can disable PBR rendering by initializing `PbrPlugin` as so:

```rs
PbrPlugin {
gltf_render_enabled: false,
gltf_enable_standard_materials: false,
..Default::default()
}
```
Expand Down