Convert colors to linear RGB before uploading in solid pipelines
This commit is contained in:
parent
b957453404
commit
6246584209
2 changed files with 9 additions and 5 deletions
|
|
@ -20,9 +20,11 @@ pub(super) struct Uniforms {
|
|||
|
||||
impl Uniforms {
|
||||
pub fn new(transform: Transformation, color: Color) -> Self {
|
||||
let [r, g, b, a] = color.into_linear();
|
||||
|
||||
Self {
|
||||
transform: transform.into(),
|
||||
color: Vec4::new(color.r, color.g, color.b, color.a),
|
||||
color: Vec4::new(r, g, b, a),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue