Base Color StandardMaterial dosn't work if default-features = false
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
I have found the solution of setting Tonemapping::None, But am still going to file a report because, I think bevy should default to a tone map the works in mimimal feature case. or at least change the deault if "tonemapping_luts" is no enabled.
the tonemapping_luts feature has "If everything is pink, you need to enable this feature or change the Tonemapping method" in its description maybe add this too the error printed to console as well so its clear they are related.
## Bevy version and features
bevy = {version = "0.16", default-features = false, features = ["bevy_winit", "bevy_pbr"]}
bevy = {git = "https://github.com/bevyengine/bevy.git", branch = "main", default-features = false, features = ["bevy_winit", "bevy_pbr"]}
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
```
`AdapterInfo { name: "NVIDIA GeForce RTX 4060 Ti", vendor: 4318, device: 10245, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "560.94", backend: Vulkan }`
```
## What you did
```rust
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, spawn_cube)
.run();
}
fn spawn_cube(
mut commands: Commands,
mut meshs: ResMut>,
mut materials: ResMut>,
) {
commands.spawn((
Camera3d::default(),
Transform::from_translation(Vec3::splat(5.0)).looking_at(Vec3::ZERO, Vec3::Y),
));
commands.spawn((
Mesh3d(meshs.add(Cuboid::from_length(1.))),
MeshMaterial3d(materials.add(Color::WHITE)),
Transform::from_xyz(0.0, 0.0, 0.0),
));
}
```
## What went wrong
The cube is rendered in the deault magenta, that indicates there is no valid handle or a missing texture, it should render as a White.
- what were you expecting?
a White cube in the center of the screen
- what actually happened?
a Magenta cube in the center of the screen
- screenshots
- logs
ERROR bevy_core_pipeline::tonemapping: TonyMcMapFace tonemapping requires the `tonemapping_luts` feature.
Either enable the `tonemapping_luts` feature for bevy in `Cargo.toml` (recommended),
or use a different `Tonemapping` method for your `Camera2d`/`Camera3d`.
Contributor guide
Research direction
Start with the minimal-feature Cargo.toml configuration, the Camera3d setup in the report, and the logged tonemapping error. Trace how the default tonemapping behaves without `tonemapping_luts`; done means the minimal-feature case no longer renders magenta, or the console message clearly explains the required alternative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100