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
b631fec80f
Cache font mesh libraries on the server
2017-10-02 19:58:38 -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
1675944dfb
Rewrite the text run and glyph store classes for simplicity
2017-09-28 09:48:05 -07:00
Patrick Walton
b6c6c70ef0
Benchmark the server-side partitioning
2017-09-26 15:38:50 -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
a5b0e9bf9a
Allow different glyphs to be selected in the mesh debugger
2017-09-19 17:36:12 -07:00
Patrick Walton
a5d0df6a96
Implement simple collision detection in the 3D demo
2017-09-14 18:48:55 -07:00
Patrick Walton
b48b256ab3
Actually reverse indices for early Z!
...
2x performance improvement. I feel silly.
2017-09-14 17:20:54 -07:00
Patrick Walton
42151cc334
Fix text positioning and improve performance in the 3D demo.
...
This implements a simple form of software backface culling to reduce vertex shading load.
2017-09-14 15:16:06 -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
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
19e8305eaa
Start the 3D camera out at a more interesting place
2017-09-11 19:37:18 -07:00
Patrick Walton
eae20eb7ca
Fix glyph positioning in the 3D view
2017-09-11 19:09:43 -07:00
Patrick Walton
3dd1d73f81
Start the camera centered on the text in the text demo
2017-09-11 16:07:11 -07:00
Patrick Walton
eb9c0ceb4d
Implement "slight" hinting by rounding x-heights up to the nearest pixel
2017-09-09 13:12:51 -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
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
6cbc7dc082
Use some names from the Mozilla Monument in the 3D demo
2017-09-06 22:50:07 -07:00
Patrick Walton
7de664e4a9
Implement some rudimentary text layout for the 3D demo
2017-09-06 22:11:32 -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
acf2e0be00
Implement mesh expansion so that the 3D demo can actually render strings of text
2017-09-06 14:11:58 -07:00
Patrick Walton
4b7ac0182c
Implement basic working 3D support
2017-09-05 19:47:19 -07:00
Patrick Walton
a9dd33d479
Stub a shader for objects in the 3D demo
2017-09-03 19:24:28 -07:00
Patrick Walton
4ab917b79b
Snap baselines to the nearest pixel
2017-09-03 16:35:10 -07:00
Patrick Walton
049b8eba97
Initial work on perspective camera control for the 3D demo
2017-09-02 13:41:08 -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
b75c327017
Factor out text layout into a separate class so it can be used by the text and 3D demos
2017-08-31 16:33:21 -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
7029248610
Stub a 3D demo
2017-08-29 19:46:18 -07:00