Patrick Walton
431dcf3d2e
Rename `pathfinder_geometry::basic` to simply `pathfinder_geometry`, and move
...
the remaining code in that crate to a new crate, `pathfinder_content`
The old hierarchy was confusing.
2019-06-21 10:06:19 -07:00
Patrick Walton
487577a11b
Add Metal support.
...
This commit substantially reworks the `pathfinder_gpu` API to better support
modern APIs like Metal. It should open the door to `gfx-rs`, `wgpu`, Vulkan,
and D3D12 backends relatively straightforwardly.
A new example, `canvas_metal_minimal`, has been added.
Note that the new Metal shaders require a patched version of `spirv-cross` to
build properly. An upstream patch is forthcoming.
2019-06-20 11:47:22 -07:00
Patrick Walton
a1b0df0a42
Rename `Point2DF` to `Vector2F`, `Point3DF` to `Vector4F`, and `LineSegmentF`
...
to `LineSegment2F`.
Straw poll on Twitter suggested that these names were preferred.
2019-06-03 12:39:29 -07:00
Patrick Walton
e1bcc11ace
Change the `F32` and `I32` suffixes to `F` and `I` to match the C API.
...
They're shorter and less noisy.
2019-05-29 19:17:16 -07:00
Patrick Walton
0deb12b3a2
Implement `fill-opacity` and `stroke-opacity` in SVG
2019-05-14 18:09:01 -07:00
Patrick Walton
86f5bdb44a
Store paints in the paint texture indexed by paint ID, not object index
2019-05-14 15:21:15 -07:00
Patrick Walton
376a1c7165
Rename "fill colors" to "paint" in preparation for gradients and images
2019-05-14 11:33:52 -07:00
Patrick Walton
d5a12e0e9f
Revert "batch alpha and solid tiles"
...
This reverts commit 753a254726
.
2019-05-13 18:20:21 -07:00
Patrick Walton
f24d93819b
Add arc building methods and switch the Moiré demo to use them.
...
Also, stop taking points by reference in many methods, for consistency.
2019-05-13 12:42:13 -07:00
bhmerchant@gmail.com
753a254726
batch alpha and solid tiles
2019-05-10 22:57:34 -07:00
Patrick Walton
a5d373cb91
Rename "object" to "path" in preparation for image objects
2019-05-10 12:03:38 -07:00
Patrick Walton
3857a28e6a
Move logic out of the `gpu_data` module
2019-05-03 18:51:36 -07:00
Patrick Walton
9de7d95d33
Start a simple HTML canvas-like API, and add a minimal example to show how to
...
use it.
2019-05-03 14:15:38 -07:00
Patrick Walton
5c5e4e9313
Factor the scene thread out of the demo and into the renderer proper.
...
This simplifies Pathfinder's API considerably. Now users get off-main-thread
scene building "for free".
2019-05-01 17:12:25 -07:00
Patrick Walton
a96ee73da6
Introduce an Executor abstraction to enable alternatives to Rayon
2019-04-30 15:17:07 -07:00
Patrick Walton
db8eb1c97c
Run `rustfmt` on the renderer crate
2019-04-29 16:45:29 -07:00
Patrick Walton
8606cd013e
Replace commented out printlns with proper debug statements
2019-04-29 16:43:24 -07:00
Patrick Walton
6c31e1bc01
In VR mode, render one eye and then reproject to both eyes instead of rendering
...
twice.
This reduces both CPU and GPU time a lot in exchange for a small loss in
quality.
2019-04-26 17:22:54 -07:00
Patrick Walton
62a3fefca4
Reenable the tile and fill counts in the debug display
2019-04-18 15:09:37 -07:00
Patrick Walton
c688d04412
Remove the scene assembly thread, and pipeline only fills instead of alpha
...
tiles.
Removing a thread should make it easier to manually assign threads to CPUs, as
is necessary on devices with poor schedulers like Magic Leap 1.
2019-04-18 13:50:26 -07:00
Patrick Walton
06439f858f
Store the tile rect in only one place in the scene assembly thread
2019-04-12 11:55:05 -07:00
Patrick Walton
21563d9d7f
Move the Z-buffer over to the `DenseTileMap` abstraction
2019-04-11 19:38:31 -07:00
Patrick Walton
6a967c19f4
Introduce a `DenseTileMap<T>` type for better abstraction and SIMD use
2019-04-11 19:25:02 -07:00
Patrick Walton
9e38da25e1
Remove the `TileObjectPrimitive` structure in favor of a flat list of
...
backdrops.
This reduces memory usage a bit and adds the infrastructure needed to support a
tile map.
2019-04-11 18:54:03 -07:00
Patrick Walton
4e6bbf59ba
Stop using `crossbeam-channel`, as it's slower than `std::sync::mpsc` on macOS
...
at least
2019-04-10 20:29:13 -07:00
Patrick Walton
3d4f8bd008
Pipeline between CPU and GPU at a more fine-grained level.
...
This makes us stop running one frame behind.
2019-04-09 17:06:43 -07:00
Patrick Walton
d090dd459b
Remove the layer of indirection between object indices and shaders
2019-04-03 11:58:45 -07:00
Patrick Walton
db3851d754
Get subpixel AA and gamma correction working in 2D
2019-03-25 16:20:34 -07:00
Patrick Walton
224c8e85b9
Create separate shaders for monochrome and multicolor tiles.
...
This is preparation for fixing subpixel AA.
2019-03-22 14:28:31 -07:00
Patrick Walton
6ca5dc5f62
Add basic barrel distortion support for VR
2019-03-20 13:41:04 -07:00
Patrick Walton
1e3298fdb7
Switch to guard-band style clipping to eliminate artefacts
2019-02-22 13:15:00 -08:00
Patrick Walton
c7a1d9e960
Use stencil to integrate the vector scene into the 3D environment
2019-02-19 12:03:02 -08:00
Patrick Walton
9af3bac11f
Implement depth interpolation, not working yet
2019-02-18 13:42:30 -08:00
Patrick Walton
a81850a899
Add window resizing support to the demo
2019-02-06 18:09:37 -08:00
Patrick Walton
3d0463999c
Add a SIMD integer rect type
2019-02-05 10:55:01 -08:00
Patrick Walton
fe410e066f
Add a SIMD rect type
2019-02-05 10:03:20 -08:00
Patrick Walton
821b54b8f4
Factor renderer and SVG code out into separate crates
2019-01-14 14:20:36 -08:00