Use premultiplied colors in triangle pipelines

This commit is contained in:
Héctor Ramón Jiménez 2025-05-12 18:35:27 +02:00
parent df37d6f9bc
commit 098bd1b8a4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
9 changed files with 37 additions and 33 deletions

View file

@ -196,14 +196,3 @@ fn gradient_fs_main(input: GradientVertexOutput) -> @location(0) vec4<f32> {
return mixed_color * radius_alpha;
}
fn unpack_color(data: vec2<u32>) -> vec4<f32> {
return premultiply(unpack_u32(data));
}
fn unpack_u32(data: vec2<u32>) -> vec4<f32> {
let rg: vec2<f32> = unpack2x16float(data.x);
let ba: vec2<f32> = unpack2x16float(data.y);
return vec4<f32>(rg.y, rg.x, ba.y, ba.x);
}