From 9705eb01ad8c2b48f7f5278ead735958947d7554 Mon Sep 17 00:00:00 2001 From: Minghao Liu Date: Fri, 26 Nov 2021 12:57:05 +0000 Subject: [PATCH] fix: as_rgba_linear used wrong variant (#3192) # Objective as_rgba_linear used wrong variant ## Solution Fixed it. --- crates/bevy_render/src/color.rs | 2 +- pipelined/bevy_render2/src/color/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_render/src/color.rs b/crates/bevy_render/src/color.rs index 5c12053d3e4db0..32ed8d2818596c 100644 --- a/crates/bevy_render/src/color.rs +++ b/crates/bevy_render/src/color.rs @@ -321,7 +321,7 @@ impl Color { green, blue, alpha, - } => Color::Rgba { + } => Color::RgbaLinear { red: red.nonlinear_to_linear_srgb(), green: green.nonlinear_to_linear_srgb(), blue: blue.nonlinear_to_linear_srgb(), diff --git a/pipelined/bevy_render2/src/color/mod.rs b/pipelined/bevy_render2/src/color/mod.rs index 8f4e666352e00b..c229da03a5d216 100644 --- a/pipelined/bevy_render2/src/color/mod.rs +++ b/pipelined/bevy_render2/src/color/mod.rs @@ -317,7 +317,7 @@ impl Color { green, blue, alpha, - } => Color::Rgba { + } => Color::RgbaLinear { red: red.nonlinear_to_linear_srgb(), green: green.nonlinear_to_linear_srgb(), blue: blue.nonlinear_to_linear_srgb(),