bevy/crates
Marco Buono f87de36843 Send emissive color to uniform as linear instead of sRGB (#7897)
This produces more accurate results for the `EmissiveStrengthTest` glTF test case.

(Requires manually setting the emission, for now)

Before: <img width="1392" alt="Screenshot 2023-03-04 at 18 21 25" src="https://user-images.githubusercontent.com/418473/222929455-c7363d52-7133-4d4e-9d6a-562098f6bbe8.png">

After: <img width="1392" alt="Screenshot 2023-03-04 at 18 20 57" src="https://user-images.githubusercontent.com/418473/222929454-3ea20ecb-0773-4aad-978c-3832353b6871.png">

Tagging @JMS55 as a co-author, since this fix is based on their experiments with emission.

# Objective

- Have more accurate results for the `EmissiveStrengthTest` glTF test case.

## Solution

- Make sure we send the emissive color as linear instead of sRGB.

---

## Changelog

- Emission strength is now correctly interpreted by the `StandardMaterial` as linear instead of sRGB.

## Migration Guide

- If you have previously manually specified emissive values with `Color::rgb()` and would like to retain the old visual results, you must now use `Color::rgb_linear()` instead;
- If you have previously manually specified emissive values with `Color::rgb_linear()` and would like to retain the old visual results, you'll need to apply a one-time gamma calculation to your channels manually to get the _actual_ linear RGB value: 
  - For channel values greater than `0.0031308`, use `(1.055 * value.powf(1.0 / 2.4)) - 0.055`;
  - For channel values lower than or equal to `0.0031308`, use `value * 12.92`;
- Otherwise, the results should now be more consistent with other tools/engines.
2023-03-04 23:26:04 +00:00
..
bevy_a11y Integrate AccessKit (#6874) 2023-03-01 22:45:04 +00:00
bevy_animation Base Sets (#7466) 2023-02-06 03:10:08 +00:00
bevy_app Add marker traits to distinguish base sets from regular system sets (#7863) 2023-03-02 13:22:58 +00:00
bevy_asset Fix hot reloading for read_asset_bytes (#6797) 2023-03-02 02:51:06 +00:00
bevy_audio Remove redundant symphonia-mp3 feature (#7852) 2023-03-01 03:22:46 +00:00
bevy_core Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
bevy_core_pipeline Remove the early exit to make sure the prepass textures are cleared (#7891) 2023-03-04 12:29:11 +00:00
bevy_derive update winit to 0.28 (#7480) 2023-02-03 16:41:39 +00:00
bevy_diagnostic Update sysinfo and improve its use a bit (#7826) 2023-02-27 01:05:58 +00:00
bevy_dylib Rename dynamic feature (#7340) 2023-01-23 14:28:00 +00:00
bevy_dynamic_plugin Adapt path type of dynamically_load_plugin (#6734) 2022-12-05 23:39:43 +00:00
bevy_ecs Fix links in QueryParIter docs (#7900) 2023-03-04 21:58:18 +00:00
bevy_ecs_compile_fail_tests EntityMut: rename remove_intersection to remove and remove to take (#7810) 2023-02-26 00:09:19 +00:00
bevy_encase_derive Update glam to 0.23 (#7883) 2023-03-04 11:42:27 +00:00
bevy_gilrs Make StartupSet a base set (#7574) 2023-02-19 03:10:06 +00:00
bevy_gltf Change the glTF loader to use Camera3dBundle (#7890) 2023-03-04 12:05:27 +00:00
bevy_hierarchy EntityMut: rename remove_intersection to remove and remove to take (#7810) 2023-02-26 00:09:19 +00:00
bevy_input add common run conditions to bevy_input (#7806) 2023-02-25 22:08:13 +00:00
bevy_internal Integrate AccessKit (#6874) 2023-03-01 22:45:04 +00:00
bevy_log Fix suppression of all console logs when trace_tracy is enabled (#6955) 2022-12-20 23:45:43 +00:00
bevy_macro_utils Update toml_edit to 0.19 (#7834) 2023-02-27 23:59:06 +00:00
bevy_math Update glam to 0.23 (#7883) 2023-03-04 11:42:27 +00:00
bevy_mikktspace Update glam to 0.23 (#7883) 2023-03-04 11:42:27 +00:00
bevy_pbr Send emissive color to uniform as linear instead of sRGB (#7897) 2023-03-04 23:26:04 +00:00
bevy_ptr Fix minor typos in code and docs (#7378) 2023-01-27 12:12:53 +00:00
bevy_reflect Update glam to 0.23 (#7883) 2023-03-04 11:42:27 +00:00
bevy_reflect_compile_fail_tests Enable deriving Reflect on structs with generic types (#7364) 2023-01-28 00:12:06 +00:00
bevy_render Use Image::default for 1 pixel white texture directly (#7884) 2023-03-04 12:29:10 +00:00
bevy_scene Base Sets (#7466) 2023-02-06 03:10:08 +00:00
bevy_sprite Use Image::default for 1 pixel white texture directly (#7884) 2023-03-04 12:29:10 +00:00
bevy_tasks Fix asset_debug_server hang. There should be at most one ThreadExecut… (#7825) 2023-03-02 08:40:25 +00:00
bevy_text fix whitespaces in comment (#7853) 2023-03-01 10:20:56 +00:00
bevy_time Add timer-based common run conditions (on_timer and on_fixed_timer) (#7866) 2023-03-02 12:53:54 +00:00
bevy_transform single parent set for transform propagate (#7869) 2023-03-02 20:04:03 +00:00
bevy_ui Change the Node doc comments to state that it stores the size in logical pixels (#7896) 2023-03-04 19:24:56 +00:00
bevy_utils Fix some typos (#7763) 2023-02-20 22:56:57 +00:00
bevy_window Transparent window on macos (#7617) 2023-03-04 14:51:23 +00:00
bevy_winit Integrate AccessKit (#6874) 2023-03-01 22:45:04 +00:00