zed/crates
Antonio Scandurra 45d1690f6e Use 16-bit float to store path windings
Previously, we were using a normalized 8-bit unsigned integer which forced us
to represent each increment of the winding number as a fraction of the max
value (1 / 255) which we would then add up using additive alpha blending.

This had three major drawbacks:

- The max winding number could not be greater than 255.
- Adding up (1 / 255) several times could result in a loss of precision.
- Due to also computing anti-aliasing as a fractional winding number, we had to
  reduce the max winding number to 32. This was still not good enough because
  we would multiply a fractional value with `1 / 32`, thus introducing more and
  more loss of precision.

This commit changes the texture type to an `f16` which doesn't require the
division by 255 and enables greater precision in the computation of the
anti-aliased parts of a curve. Note how this also removes the limitation of 255
windings at most per curve. The tradeoff is paying twice as much memory for
storing the texture, but that seems totally valid to achieve rendering accuracy.

Note that this kind of texture should be compatible with WebGL2 once we start
working on a web version of Zed.
2021-12-05 11:17:26 +01:00
..
chat_panel Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
client Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
clock Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
collections Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
contacts_panel Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
editor Fix alignment of blocks adjacent to other blocks 2021-12-01 17:58:44 -07:00
file_finder Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
fsevent Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
fuzzy Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
go_to_line Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
gpui Use 16-bit float to store path windings 2021-12-05 11:17:26 +01:00
gpui_macros Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
language Avoid allocating a Patch just to check if there are no edits 2021-12-01 16:47:04 +01:00
lsp Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
project Use the new buffer subscription API to keep DisplayMap in sync 2021-12-01 16:08:53 +01:00
project_panel Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
rpc Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
server Fix warning 2021-11-30 12:27:00 -07:00
sum_tree Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
text Use the new buffer subscription API to keep DisplayMap in sync 2021-12-01 16:08:53 +01:00
theme Start work on generalizing the BlockMap to allow arbitrary elements 2021-12-01 15:25:55 -08:00
theme_selector Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
util Improve logging when avatar request fails 2021-10-04 15:47:18 -07:00
workspace Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00
zed Name the root file of every crate after the crate to ease navigation 2021-11-30 12:46:39 -07:00