Patrick Walton
a8019a1a1a
Fix mask positioning on OpenGL
2020-02-15 18:00:25 -08:00
Patrick Walton
631e16ce9b
Fix flipped Y axis in mask texture positioning
2020-02-15 14:08:22 -08:00
Patrick Walton
6e28552a44
Add missing shaders
2020-02-14 22:10:04 -08:00
Patrick Walton
0883f54e2d
Add a separate mask blit step, in preparation for supporting clips.
...
We can elide this in the future if there are no clips, but it isn't a huge
performance regression right now, so let's just unconditionally do it.
2020-02-14 21:56:43 -08:00
Patrick Walton
5a21557a6d
Implement basic linear gradients.
...
This is not a very efficient implementation yet, but it seems to work.
2020-02-10 16:01:05 -08:00
Patrick Walton
a66ed4c073
Specify tile texture coordinates as an affine transform.
...
Part of the groundwork for gradients.
2020-02-05 13:59:32 -08:00
Patrick Walton
b269723254
Switch to per-pixel texture lookup for paints.
...
This is a prerequisite for supporting gradients and images.
2020-02-04 21:50:13 -08:00
Patrick Walton
222fa89b23
Use a 3D transform in the tile vertex shaders.
...
This opens the door to caching tiles at different zoom levels (issue #191 ).
2019-06-25 11:32:39 -07:00
Patrick Walton
d86ff9011a
Update the postprocessing shader and vertex array for the Metal changes.
...
Closes #201 .
2019-06-21 18:04:18 -07:00
Patrick Walton
b16300bf02
Move the SWF assets into `resources/`.
2019-06-21 09:32:48 -07:00
Patrick Walton
de0662e08e
Update `spirv-cross` to upstream master.
...
A fix has been merged for the issue that was breaking Pathfinder, so we can now
use the master branch.
2019-06-21 07:24:24 -07:00
Patrick Walton
8ec4f04deb
Make `canvas-text` use a custom font
2019-06-20 21:34:46 -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
Alan Jeffrey
45d7f7ad9a
Make the backgrounds of the demo SVGs off-white
2019-06-07 12:23:55 -05:00
Patrick Walton
9f9233c153
Add Metal shaders, cross-compiled from the GLSL via SPIR-V.
...
The Metal shaders are checked into the repository for convenience, but they
should not be directly edited. Instead, edit the corresponding GLSL shader in
the top-level `shaders/` directory, and rerun `make` in there.
2019-06-05 18:29:25 -07:00
Patrick Walton
bc713a5181
Remove the rustache dependency.
...
1/3 reduction in binary size for `canvas_minimal`.
Closes #158 .
2019-05-26 13:02:52 -07:00
Patrick Walton
25a6c33a1a
Remove the object index attribute from the shaders, since it's now unused
2019-05-14 15:22:50 -07:00
Patrick Walton
7a02b78b3d
Explicitly specify color texture coordinates for alpha and solid tiles.
...
This is groundwork for gradients and images.
This commit also refactors the interface for vertex attributes to use named
parameters (via structs), for clarity.
2019-05-14 15:11:04 -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
ebdb12404a
Add missing "actual size" texture
2019-05-08 17:51:59 -07:00
Patrick Walton
5e64876579
Simplify gridlines in the demo shader
2019-05-02 14:12:13 -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
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
Alan Jeffrey
bd70cb0135
Changed some of the magicleap demo SVGs
2019-04-15 12:43:41 -04:00
Patrick Walton
c5ccd0f6e0
Add partial support for transparent background colors.
2019-04-10 14:43:36 -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
0458d9a7f2
Factor out bits of the postprocessing shader into includes
2019-03-18 21:40:10 -07:00
Patrick Walton
9c404dfdc1
Add an Android port
2019-03-12 13:55:26 -07:00
Patrick Walton
64b480fe32
Some more work on the site
2019-03-01 14:58:02 -08:00
Patrick Walton
dc69d1197e
Tweak debug UI
2019-02-26 15:24:39 -08:00
Patrick Walton
92777c6346
Make rects rounded and optimize PNGs
2019-02-26 13:48:35 -08:00
Patrick Walton
f6af769486
Add screenshot functionality.
2019-02-25 11:33:26 -08:00
Patrick Walton
aef7dd1353
Allow the background color to be changed in the demo
2019-02-22 18:21:03 -08:00
Patrick Walton
e10e2e97d4
Tweak the camera transforms in the 3D view
2019-02-22 11:54:01 -08:00
Patrick Walton
0da196aa92
Scale the SVG appropriately in the demo
2019-02-21 20:19:42 -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
3b8ecfd74c
WIP before removing barycentric coordinates
2019-02-18 18:13:10 -08:00
Patrick Walton
9af3bac11f
Implement depth interpolation, not working yet
2019-02-18 13:42:30 -08:00
Patrick Walton
d30743a69c
Begin refactoring the demo into a shared library and a platform-specific
...
entry point.
This will help the upcoming wasm port.
2019-02-15 18:21:46 -08:00
Patrick Walton
faad8c3950
Remove old resources
2019-02-08 14:43:47 -08:00
Patrick Walton
a4386ab3e7
Add a new Ghostscript tiger test case
2019-01-17 09:18:18 -08:00
Patrick Walton
6e13fb171c
Use a lookup table to do area calculations instead of Loop-Blinn-style
...
distance-to-edge for stencil analytic antialiasing.
This improves the rendering quality of stencil AAA significantly.
Additionally, this adds an approximation of Core Graphics' (macOS')
defringing filter.
Closes #73 .
2018-03-19 14:35:36 -07:00
Patrick Walton
0720b04591
Scale stroke widths correctly in the Ghostscript tiger test
2018-01-18 17:01:47 -08:00
Patrick Walton
4a71f79a78
Make the logo in the navbar monochrome
2018-01-04 14:43:37 -08:00
Patrick Walton
275a937439
Fix colors and view box for the reference in the SVG reftest
2018-01-04 14:14:47 -08:00
Patrick Walton
c5187deedd
Use the monochrome MCAA mode for the Material Design icons SVG demo.
...
This avoids ugly pixel snapping.
2018-01-03 20:53:25 -08:00
Patrick Walton
797b935f35
Add Material Design icons to the SVG demo
2017-12-19 19:11:12 -08:00
Patrick Walton
23482b2af8
Add the logo to the demo.
...
Logo design courtesy Jay Vining.
2017-12-19 14:51:51 -08:00
Patrick Walton
6d85cb3382
Rename the integration test to the reference test to be more specific
2017-11-20 17:18:30 -08:00
Patrick Walton
529a3eae23
Add rotation support for SSAA in SVG; switch to Material Design icons
2017-11-20 15:32:02 -08:00
Patrick Walton
86df78f939
Flesh out the integration test more
2017-11-17 17:06:59 -08:00
Patrick Walton
0a5f4c65df
Add a prebuilt gamma LUT
2017-11-07 11:56:04 -08:00
Patrick Walton
37a88dfcd9
Use the Inter UI font in the demo
2017-09-28 15:23:52 -07:00
Patrick Walton
6cbc7dc082
Use some names from the Mozilla Monument in the 3D demo
2017-09-06 22:50:07 -07:00
Patrick Walton
64e3558986
Considate `resources` directories
2017-08-29 19:27:05 -07:00
Patrick Walton
93c928bf5c
Move Pathfinder to `pathfinder-classic` in preparation for Pathfinder 2
2017-06-27 14:13:11 -07:00
Patrick Walton
45ade674be
Refactor `lorem-ipsum`
2017-02-28 12:33:42 -08:00
Patrick Walton
b86133a4ef
Initial experimental support for subpixel antialiasing
2017-02-22 16:31:44 -08:00
Patrick Walton
49408b95cb
Add support for subpixel offsets.
...
Closes #11 .
2017-02-20 16:01:15 -08:00
Patrick Walton
6ac37c5085
Support cubic Béziers for fonts with CFF outlines
2017-02-16 19:37:21 -08:00
Patrick Walton
1b10ffdd54
Try to fix Linux/Windows
2017-02-14 12:29:30 -08:00
Patrick Walton
731360bc9d
Try to fix RGBA atlas generation in OpenGL
2017-02-13 12:32:15 -08:00
Patrick Walton
cd11deab46
Support RGBA atlases, needed for WebRender
2017-02-10 19:07:23 -08:00
Patrick Walton
96daa32b90
Move direction calculation from the TCS to the TES to properly handle cusps
2017-02-09 17:09:19 -08:00
Patrick Walton
5ecfadc3be
Update for unorm change in `compute-shader`
2017-02-08 16:29:23 -08:00
Patrick Walton
428a91aefa
Get things working on Windows
2017-02-08 13:55:36 -08:00
Patrick Walton
e9fd5d6b1b
Work around driver bugs on Apple Radeon GPUs
2017-02-07 14:39:36 -08:00
Patrick Walton
65153b65ee
Fix subpixel positioning
2017-02-06 18:02:16 -08:00
Patrick Walton
7cd7210304
Fix winding rule to paint negative winding numbers
2017-02-06 15:28:23 -08:00
Patrick Walton
3fb592e05a
Fix up examples and tests
2017-02-02 16:40:46 -08:00
Patrick Walton
5bccf88445
Make zooming work better; fix atlas sizing bugs
2017-01-30 18:33:44 -08:00
Patrick Walton
30daf10cdd
Fix syntax on Linux; drop GL version to 3.3
2017-01-25 20:25:54 -08:00
Patrick Walton
2f181f23aa
Add a draft GLSL accumulation step, currently untested
2017-01-25 19:22:04 -08:00
Patrick Walton
1336bb790e
Add a geometry-shader-based path for debugging.
...
This is useful for testing via llvmpipe or softpipe on Linux, because
no software Mesa backend supports tessellation shaders.
2017-01-25 18:53:11 -08:00
Patrick Walton
d5b61e382e
Get things basically working
2017-01-25 17:08:00 -08:00
Patrick Walton
50ad78db2a
Draft end-to-end support for the new algorithm. Not working yet.
2017-01-24 15:30:14 -08:00
Patrick Walton
1cd3a1e6bd
Migrate the glyph buffers to be OpenGL buffers
2017-01-23 22:03:40 -08:00
Patrick Walton
0569831969
Fix shader compilation errors; convert the coverage buffer to a texture
2017-01-23 19:39:51 -08:00
Patrick Walton
f1ec3385de
Draft shader code for the new tessellation-based algorithm
2017-01-23 15:33:12 -08:00
Patrick Walton
bdf6ebab24
Draft complete end-to-end code. Not working yet.
2017-01-11 20:44:10 -08:00
Patrick Walton
7056a7632b
Create buffers and create skeleton OpenCL shaders
2017-01-10 19:57:08 -08:00
Patrick Walton
941aaea676
Encode contours. 0.3-0.4 µs per glyph or so.
2017-01-09 19:49:00 -08:00