bevy/crates/bevy_render/src/texture
Alice Cecile 8ec65525ab
Port bevy_core_pipeline to LinearRgba (#12116)
# Objective

- We should move towards a consistent use of the new `bevy_color` crate.
- As discussed in #12089, splitting this work up into small pieces makes
it easier to review.

## Solution

- Port all uses of `LegacyColor` in the `bevy_core_pipeline` to
`LinearRgba`
- `LinearRgba` is the correct type to use for internal rendering types
- Added `LinearRgba::BLACK` and `WHITE` (used during migration)
- Add `LinearRgba::grey` to more easily construct balanced grey colors
(used during migration)
- Add a conversion from `LinearRgba` to `wgpu::Color`. The converse was
not done at this time, as this is typically a user error.

I did not change the field type of the clear color on the cameras: as
this is user-facing, this should be done in concert with the other
configurable fields.

## Migration Guide

`ColorAttachment` now stores a `LinearRgba` color, rather than a Bevy
0.13 `Color`.
`set_blend_constant` now takes a `LinearRgba` argument, rather than a
Bevy 0.13 `Color`.

---------

Co-authored-by: Alice Cecile <alice.i.cecil@gmail.com>
2024-02-26 12:25:11 +00:00
..
basis.rs
compressed_image_saver.rs RenderAssetPersistencePolicy → RenderAssetUsages (#11399) 2024-01-30 13:22:10 +00:00
dds.rs mipmap levels can be 0 and they should be interpreted as 1 (#11767) 2024-02-11 22:00:07 +00:00
exr_texture_loader.rs RenderAssetPersistencePolicy → RenderAssetUsages (#11399) 2024-01-30 13:22:10 +00:00
fallback_image.rs Prefer UVec2 when working with texture dimensions (#11698) 2024-02-25 15:23:04 +00:00
hdr_texture_loader.rs RenderAssetPersistencePolicy → RenderAssetUsages (#11399) 2024-01-30 13:22:10 +00:00
image_loader.rs mipmap levels can be 0 and they should be interpreted as 1 (#11767) 2024-02-11 22:00:07 +00:00
image_texture_conversion.rs RenderAssetPersistencePolicy → RenderAssetUsages (#11399) 2024-01-30 13:22:10 +00:00
image.rs Prefer UVec2 when working with texture dimensions (#11698) 2024-02-25 15:23:04 +00:00
ktx2.rs Made bevy_color a dependency of bevy_render (#12105) 2024-02-25 22:35:00 +00:00
mod.rs Keep track of when a texture is first cleared (#10325) 2023-12-31 00:37:37 +00:00
texture_attachment.rs Port bevy_core_pipeline to LinearRgba (#12116) 2024-02-26 12:25:11 +00:00
texture_cache.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00