bevy/crates
Rafał Harabień 51c70bc98c
Fix fog color being inaccurate (#10226)
# Objective

Fog color was passed to shaders without conversion from sRGB to linear
color space. Because shaders expect colors in linear space this resulted
in wrong color being used. This is most noticeable in open scenes with
dark fog color and clear color set to the same color. In such case
background/clear color (which is properly processed) is going to be
darker than very far objects.

Example:

![image](https://github.com/bevyengine/bevy/assets/160391/89b70d97-b2d0-4bc5-80f4-c9e8b8801c4c)

[bevy-fog-color-bug.zip](https://github.com/bevyengine/bevy/files/13063718/bevy-fog-color-bug.zip)

## Solution

Add missing conversion of fog color to linear color space.

---

## Changelog

* Fixed conversion of fog color

## Migration Guide

- Colors in `FogSettings` struct (`color` and `directional_light_color`)
are now sent to the GPU in linear space. If you were using
`Color::rgb()`/`Color::rgba()` and would like to retain the previous
colors, you can quickly fix it by switching to
`Color::rgb_linear()`/`Color::rgba_linear()`.
2023-10-23 12:45:18 +00:00
..
bevy_a11y Various accessibility API updates. (#9989) 2023-10-02 21:22:52 +00:00
bevy_animation refactor: Change Option<With<T>> query params to Has<T> (#9959) 2023-10-02 01:21:41 +00:00
bevy_app fix run-once runners (#10195) 2023-10-23 12:25:02 +00:00
bevy_asset assets: use blake3 instead of md5 (#10208) 2023-10-23 04:15:04 +00:00
bevy_audio More ergonomic spatial audio (#9800) 2023-10-09 19:43:56 +00:00
bevy_core Change visibility of bevy::core::update_frame_count to pub (#10111) 2023-10-16 13:43:02 +00:00
bevy_core_pipeline Bind group entries (#9694) 2023-10-21 15:39:22 +00:00
bevy_derive bevy_derive: Fix #[deref] breaking other attributes (#9551) 2023-08-28 17:36:18 +00:00
bevy_diagnostic Unify FixedTime and Time while fixing several problems (#8964) 2023-10-16 01:57:55 +00:00
bevy_dylib Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_dynamic_plugin Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_ecs ParamSets containing non-send parameters should also be non-send (#10211) 2023-10-21 18:07:52 +00:00
bevy_ecs_compile_fail_tests Updates for rust 1.73 (#10035) 2023-10-06 00:31:10 +00:00
bevy_encase_derive Bump Version after Release (#9106) 2023-07-10 21:19:27 +00:00
bevy_gilrs Unify FixedTime and Time while fixing several problems (#8964) 2023-10-16 01:57:55 +00:00
bevy_gizmos Bind group entries (#9694) 2023-10-21 15:39:22 +00:00
bevy_gltf Multiple Asset Sources (#9885) 2023-10-13 23:17:32 +00:00
bevy_hierarchy Fix some warnings shown in nightly (#10012) 2023-10-05 05:41:09 +00:00
bevy_input Change AxisSettings livezone default (#10090) 2023-10-12 17:58:32 +00:00
bevy_internal re-export debug_glam_assert feature (#10206) 2023-10-22 23:01:28 +00:00
bevy_log Update tracy-client requirement from 0.15 to 0.16 (#9436) 2023-08-15 07:45:21 +00:00
bevy_macro_utils Update toml_edit requirement from 0.19 to 0.20 (#10058) 2023-10-09 11:55:16 +00:00
bevy_macros_compile_fail_tests bevy_derive: Fix #[deref] breaking other attributes (#9551) 2023-08-28 17:36:18 +00:00
bevy_math re-export debug_glam_assert feature (#10206) 2023-10-22 23:01:28 +00:00
bevy_mikktspace add and fix shields in Readmes (#9993) 2023-10-15 00:52:31 +00:00
bevy_pbr Fix fog color being inaccurate (#10226) 2023-10-23 12:45:18 +00:00
bevy_ptr add and fix shields in Readmes (#9993) 2023-10-15 00:52:31 +00:00
bevy_reflect bevy_reflect: Fix ignored/skipped field order (#7575) 2023-10-22 12:43:31 +00:00
bevy_reflect_compile_fail_tests Improve TypeUuid's derive macro error messages (#9315) 2023-10-02 12:42:01 +00:00
bevy_render Add convenient methods for Image (#10221) 2023-10-22 01:45:29 +00:00
bevy_scene Correct Scene loader error description (#10161) 2023-10-17 17:58:35 +00:00
bevy_sprite Add convenient methods for Image (#10221) 2023-10-22 01:45:29 +00:00
bevy_tasks add and fix shields in Readmes (#9993) 2023-10-15 00:52:31 +00:00
bevy_text Remove unused import warning when default_font feature is disabled (#10230) 2023-10-23 12:24:00 +00:00
bevy_time add on_real_time_timer run condition (#10179) 2023-10-20 12:58:37 +00:00
bevy_transform Add system parameter for computing up-to-date GlobalTransforms (#8603) 2023-10-18 20:07:51 +00:00
bevy_ui Tidy up UI node docs (#10189) 2023-10-21 17:38:15 +00:00
bevy_utils Bind group entries (#9694) 2023-10-21 15:39:22 +00:00
bevy_window Various accessibility API updates. (#9989) 2023-10-02 21:22:52 +00:00
bevy_winit fix run-once runners (#10195) 2023-10-23 12:25:02 +00:00