mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-23 18:06:34 +11:00
predicate image loads on non-zero mask
This commit is contained in:
parent
923c949e95
commit
a6307a2520
1 changed files with 1 additions and 1 deletions
|
@ -294,7 +294,7 @@ fn main(
|
||||||
let my_xy = vec2(xy.x + f32(i), xy.y);
|
let my_xy = vec2(xy.x + f32(i), xy.y);
|
||||||
let atlas_uv = image.matrx.xy * my_xy.x + image.matrx.zw * my_xy.y + image.xlat + image.atlas_offset;
|
let atlas_uv = image.matrx.xy * my_xy.x + image.matrx.zw * my_xy.y + image.xlat + image.atlas_offset;
|
||||||
// This currently clips to the image bounds. TODO: extend modes
|
// This currently clips to the image bounds. TODO: extend modes
|
||||||
if all(atlas_uv < atlas_extents) {
|
if all(atlas_uv < atlas_extents) && area[i] != 0.0 {
|
||||||
let uv_quad = vec4(max(floor(atlas_uv), image.atlas_offset), min(ceil(atlas_uv), atlas_extents));
|
let uv_quad = vec4(max(floor(atlas_uv), image.atlas_offset), min(ceil(atlas_uv), atlas_extents));
|
||||||
let uv_frac = fract(atlas_uv);
|
let uv_frac = fract(atlas_uv);
|
||||||
let a = premul_alpha(textureLoad(image_atlas, vec2<i32>(uv_quad.xy), 0));
|
let a = premul_alpha(textureLoad(image_atlas, vec2<i32>(uv_quad.xy), 0));
|
||||||
|
|
Loading…
Add table
Reference in a new issue