Patrick Walton
82fd214a76
Load the gamma LUT in the demo
2017-11-07 14:13:13 -08:00
Patrick Walton
4cbc2a8800
Add partial support for clip paths in the SVG demo.
...
At the moment, this only works when antialiasing is off.
2017-11-03 14:14:29 -07:00
Patrick Walton
b9f6f13cec
Stop going to the DOM every time we need the color of an SVG path
2017-10-31 14:50:15 -07:00
Patrick Walton
579528ebdc
Remove one direct rendering pass from the multicolor XCAA path
2017-10-31 12:41:38 -07:00
Patrick Walton
d65bfb7fb2
Show compositing time in the SVG demo
2017-10-31 12:35:24 -07:00
Patrick Walton
2604151521
Replace the multicolor (SVG) XCAA with a multipass compositing algorithm
2017-10-30 15:28:35 -07:00
Patrick Walton
0506365cc7
Fix blending in the text demo.
...
As a nice added cleanup, this commit standardizes on the red channel for
all monochrome textures.
2017-10-26 20:15:51 -07:00
Patrick Walton
9d93cebca6
Stop using multiple render targets.
...
We don't need them anymore, so let's lower our hardware requirements!
2017-10-20 22:04:53 -07:00
Patrick Walton
048c261f6c
Add a working experimental implementation of XCAA for SVG.
...
This has known performance problems and artefacts due to working at
sample level only, but it's a decent first cut.
2017-10-20 19:41:18 -07:00
Patrick Walton
562851fd6e
Lint against long lines
2017-10-17 11:58:03 -07:00
Patrick Walton
03ee672787
Separate the GPU rendering component of views from the view objects
...
themselves in the demo.
This (mostly) enables rendering outside a view.
2017-10-16 22:26:25 -07:00
Patrick Walton
314185684c
Implement stem darkening and split ECAA into ECAA and MCAA.
...
We now implement stem darkening (also known as font dilation) like
macOS and FreeType under certain configurations. This pushes out font
outlines along their normals slightly in order to make small text easier
to read. This is especially important when performing gamma correction,
as otherwise text can end up too light.
Because the stem darkening is implemented in the vertex shader, it can
easily break the mesh. Therefore, I needed to implement a new rendering
mode that does not use the mesh. It's a variant of ECAA, and for
clarity's sake I've renamed the related antialiasing methods:
* MCAA stands for "mesh coverage antialiasing" and is the new name for
what was called "ECAA" prior to this patch.
* ECAA now stands for "edge coverage antialiasing". It does not use the
mesh but rather computes winding numbers from scratch for every pixel.
Surprisingly, despite being worse asymptotically, this usually ends up
being faster than MCAA at small font sizes, presumably because there are
fewer vertices to transform.
* XCAA, "exact coverage antialiasing" is a generic term that refers to
both ECAA and MCAA. References to ECAA have been changed to XCAA as
needed.
2017-10-15 13:28:49 -07:00
Patrick Walton
2a236319d4
Use regular VBOs instead of textures to store vertex positions for ECAA.
...
This improves performance at small font sizes a bit by reducing vertex
shading load.
2017-10-06 16:42:51 -07:00
Patrick Walton
6a7c013e61
Make the hints a uniform instead of a buffer texture.
...
Saves a good bit of memory traffic during vertex shading.
2017-10-05 19:14:52 -07:00
Patrick Walton
157292175b
Use instanced rendering in the 3D demo.
...
This massively decreases the load time and memory usage in exchange for more draw calls.
2017-10-03 15:24:56 -07:00
Patrick Walton
7bbd02ed85
Send mesh libraries to the client in raw binary instead of Base64 and JSON
2017-10-02 16:31:54 -07:00
Patrick Walton
60ff71be84
Add an experimental implementation of macOS-like font dilation
...
Following Apple's earlier terminology, this is exposed as "strong"
subpixel AA.
2017-09-29 22:12:24 -07:00
Patrick Walton
e8135fbfe0
TSLint the demo
2017-09-28 14:34:48 -07:00
Patrick Walton
2197896c4f
Keep the camera and view in a sensible state when changing fonts in the text demo
2017-09-23 13:09:45 -07:00
Patrick Walton
0e9a59088c
Implement bare-bones support for debugging SVG meshes
2017-09-19 20:19:53 -07:00
Patrick Walton
e7a6861846
Factor the SVG loading functionality out of the SVG demo.
...
This allows the mesh debugger to use it.
2017-09-19 18:04:42 -07:00
Patrick Walton
a21afa9bb7
Fix the interaction between the camera and SSAA in the SVG demo
2017-09-13 20:41:04 -07:00
Patrick Walton
6642cc7aa4
Limit how far the user can zoom the camera out
2017-09-13 13:30:26 -07:00
Patrick Walton
d64a28c166
Beautify the timings display and make it work with the SVG and 3D demos
2017-09-13 11:56:40 -07:00
Patrick Walton
65eecbf071
Don't allow the user to zoom in so far that we run out of space in the glyph atlas
2017-09-12 22:32:18 -07:00
Patrick Walton
f68da75c75
Implement SSAA for the 3D demo.
...
This commit additionally refactors transforms to be resolution-independent as much as possible throughout all the demos.
2017-09-12 19:43:43 -07:00
Patrick Walton
2c8c11b303
Get a bare-minimum benchmark up and running
2017-09-12 12:40:14 -07:00
Patrick Walton
7d3afa0e74
Initially zoom the SVG to fit
2017-09-11 17:56:37 -07:00
Patrick Walton
43513da957
Add a simple model of the Mozilla Monument to the 3D scene
2017-09-09 00:04:35 -07:00
Patrick Walton
c36896e337
Implement path stroking using the FreeType stroker.
...
I'm not too happy with this, as I discovered a segfault in FreeType that doesn't give me confidence
in this as a solution for the long term. Additionally, this exposes the problems in the partitioner
with lack of winding fill rule, proper handling of self-intersections, and splitting of paths at
their extrema. (I believe these problems should be fairly straightforward to handle, but we just
don't handle them yet.)
2017-09-08 16:50:27 -07:00
Patrick Walton
57374e9f30
Add all four sides of the Mozilla Monument to the 3D demo
2017-09-07 19:01:55 -07:00
Patrick Walton
e34ca3d3e4
Stub support for multiple text frames
2017-09-07 16:13:55 -07:00
Patrick Walton
82d2f076d7
Add basic subpixel AA support for SSAA.
...
No LCD filter is implemented yet, so the color fringing is currently fairly extreme.
2017-09-06 16:32:11 -07:00
Patrick Walton
4b7ac0182c
Implement basic working 3D support
2017-09-05 19:47:19 -07:00
Patrick Walton
7360a41a60
Factor camera logic into a separate object in preparation for the 3D demo
2017-09-02 12:14:10 -07:00
Patrick Walton
632202e5eb
Implement a basic mesh debugger
2017-09-01 22:29:05 -07:00
Patrick Walton
1eb1bb5343
Stub a mesh debugger app
2017-09-01 18:11:44 -07:00
Patrick Walton
982c97771c
Get the 3D view rendering something
2017-08-31 19:19:26 -07:00
Patrick Walton
f182686ba8
Do some more refactoring in preparation for the 3D view
2017-08-31 17:08:22 -07:00
Patrick Walton
e448ba7b30
Switch from ES6 interpolation to Handlebars and add a simple landing page
2017-08-30 23:25:58 -07:00
Patrick Walton
d6767219ff
Automatically load some built-in fonts and SVGs
2017-08-30 19:48:18 -07:00
Patrick Walton
58b558de64
Make the demo UI less cluttered
2017-08-30 17:01:28 -07:00
Patrick Walton
8d6636b1cf
Add `-demo` to the SVG and text demo files
2017-08-29 18:57:43 -07:00