render: fix vulkan formats for pre-multiplied alpha
This commit is contained in:
parent
30fb0f087f
commit
1a024babdf
3 changed files with 7 additions and 7 deletions
|
|
@ -85,11 +85,11 @@ impl Color {
|
|||
[to_u8(self.r), to_u8(self.g), to_u8(self.b), to_u8(self.a)]
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn to_array_srgb(self) -> [f32; 4] {
|
||||
[self.r, self.g, self.b, self.a]
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn to_array_linear(self) -> [f32; 4] {
|
||||
fn to_linear(srgb: f32) -> f32 {
|
||||
if srgb <= 0.04045 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue