Use premultiplied colors in triangle pipelines
This commit is contained in:
parent
df37d6f9bc
commit
098bd1b8a4
9 changed files with 37 additions and 33 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue