bevy/docs
Elabajaba 65b3ff1c63
Log a warning when the tonemapping_luts feature is disabled but required for the selected tonemapper. (#10253)
# Objective

Make it obvious why stuff renders pink when rendering stuff with bevy
with `default_features = false` and bevy's default tonemapper
(TonyMcMapFace, it requires a LUT which requires the `tonemapping_luts`,
`ktx2`, and `zstd` features).

Not sure if this should be considered as fixing these issues, but in my
previous PR (https://github.com/bevyengine/bevy/pull/9073, and old
discussions on discord that I only somewhat remember) it seemed like we
didn't want to make ktx2 and zstd required features for
bevy_core_pipeline.

Related https://github.com/bevyengine/bevy/issues/9179
Related https://github.com/bevyengine/bevy/issues/9098

## Solution

This logs an error when a LUT based tonemapper is used without the
`tonemapping_luts` feature enabled, and cleans up the default features a
bit (`tonemapping_luts` now includes the `ktx2` and `zstd` features,
since it panics without them).

Another solution would be to fall back to a non-lut based tonemapper,
but I don't like this solution as then it's not explicitly clear to
users why eg. a library example renders differently than a normal bevy
app (if the library forgot the `tonemapping_luts` feature).

I did remove the `ktx2` and `zstd` features from the list of default
features in Cargo.toml, as I don't believe anything else currently in
bevy relies on them (or at least searching through every hit for `ktx2`
and `zstd` didn't show anything except loading an environment map in
some examples), and they still show up in the `cargo_features` doc as
default features.

---

## Changelog

- The `tonemapping_luts` feature now includes both the `ktx2` and `zstd`
features to avoid a panic when the `tonemapping_luts` feature was enable
without both the `ktx2` and `zstd` feature enabled.
2023-10-27 02:07:24 +00:00
..
cargo_features.md Log a warning when the tonemapping_luts feature is disabled but required for the selected tonemapper. (#10253) 2023-10-27 02:07:24 +00:00
debugging.md Useful changes with relicensing benefits (#2497) 2021-07-17 21:59:31 +00:00
linters.md Allow clippy::type_complexity in more places. (#9796) 2023-10-02 21:55:16 +00:00
linux_dependencies.md Wslg docs (#9842) 2023-09-20 12:10:56 +00:00
plugins_guidelines.md Remove last mentions of Stages (#7553) 2023-02-07 18:07:57 +00:00
profiling.md Better link for prepare_windows docs (#10142) 2023-10-16 17:08:46 +00:00
release_checklist.md Fix release workflow (#4903) 2022-06-06 15:47:51 +00:00
the_bevy_organization.md remove bors and small CI improvements (#7947) 2023-03-07 21:42:53 +00:00