mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Remove conditional from winding number computation
This commit is contained in:
parent
5c444b2bfa
commit
f5e5d7180f
1 changed files with 1 additions and 4 deletions
|
@ -204,10 +204,7 @@ fragment float4 sprite_fragment(
|
|||
float4 sample = atlas.sample(atlas_sampler, input.atlas_position);
|
||||
float mask;
|
||||
if (input.compute_winding) {
|
||||
mask = fmod(sample.r * MAX_WINDINGS, 2.);
|
||||
if (mask > 1) {
|
||||
mask = 2. - mask;
|
||||
}
|
||||
mask = 1. - abs(1. - fmod(sample.r * MAX_WINDINGS, 2.));
|
||||
} else {
|
||||
mask = sample.a;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue