Patrick Walton
3245796445
Add support for multiple paint texture pages.
...
This avoids arbitrary limits on the number of images, gradients, etc. you can
have.
2020-02-21 14:46:10 -08:00
Patrick Walton
36538d5748
Implement a few more blend modes and switch to premultiplied alpha for layer
...
compositing
2020-02-20 22:22:15 -08:00
Patrick Walton
4933efb513
Add Lighten and Darken composite ops
2020-02-20 20:38:43 -08:00
Patrick Walton
0c3dad974f
Expose individual blend factors in `pathfinder_gpu`
2020-02-20 15:28:37 -08:00
Patrick Walton
d9e994e46d
Transition the existing postprocessing system to a layers system.
...
This is preparatory work for composite ops and blurs.
Closes #261 .
2020-02-20 11:21:45 -08:00
Patrick Walton
677c607a8c
Get clips working for canvas
2020-02-16 13:45:15 -08:00
Patrick Walton
ce3b40cd5c
Make timer queries and framebuffer readback async
2020-01-07 13:03:15 -08:00
Patrick Walton
0662f6433f
Allow any texture format to be uploaded; fix Metal compilation on newer rustcs
2019-12-20 11:48:51 -08:00
Patrick Walton
7c655246ae
Add some more features to blending, and expand texture upload features
2019-12-19 08:58:02 -08:00
Patrick Walton
8dabd0a7ea
Add RGBA32F support
2019-12-14 13:58:02 -08:00
Patrick Walton
fa54868eb1
Add support for single float uniforms to `pathfinder_gpu`
2019-11-15 21:17:50 -08:00
Patrick Walton
ff212dce36
Add 2D matrix uniform types and a couple more useful geometry methods
2019-11-10 10:28:20 -08:00
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
dbf02fb742
Make `get_vertex_attr()` fallible
2019-06-12 10:50:24 -07:00
Patrick Walton
412d35ae57
Merge pull request #182 from toolness/cfg-debug-assertions
...
Define ck() based on cfg(debug_assertions)
2019-06-05 18:32:51 -07: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
Atul Varma
7563e95d96
Add a more helpful panic message when GL errors occur.
2019-06-05 08:15:21 -04:00
Atul Varma
5ce4e2e128
Define ck() based on cfg(debug_assertions).
2019-06-05 07:45:52 -04: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
acf666b701
Stop using triangle fans for DX12/Vulkan compatibility.
...
Closes #165 .
2019-05-29 16:04:33 -07:00
Luis de Bethencourt
0231542141
Fix unused variable warning
...
Fixing the following warning
warning: unused variable: `resources`
2019-05-27 15:22:27 -04:00
Atul Varma
ea3cdbb2a9
Merge remote-tracking branch 'origin/master' into pathfinder-unity-fun
2019-05-27 13:41:19 -04:00
Atul Varma
a51501791d
Add GLDevice::set_default_framebuffer().
2019-05-27 07:56:36 -04: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
e04cc273ee
Add enough C bindings to recreate `canvas_minimal` in C.
...
Closes #12 .
2019-05-25 20:21:38 -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
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
db3851d754
Get subpixel AA and gamma correction working in 2D
2019-03-25 16:20:34 -07:00
Patrick Walton
29cedb96ef
Merge pull request #113 from asajeffrey/gl-nonzero-default-framebuffer
...
Allow a non-zero default framebuffer
2019-03-25 15:13:46 -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
Alan Jeffrey
ab3b28f82b
Allow a non-zero default framebuffer
2019-03-21 13:34:59 -05:00
Patrick Walton
0458d9a7f2
Factor out bits of the postprocessing shader into includes
2019-03-18 21:40:10 -07:00
Patrick Walton
bb32777101
Initial work toward VR support
2019-03-14 14:42:22 -07:00
Patrick Walton
9c404dfdc1
Add an Android port
2019-03-12 13:55:26 -07:00
Patrick Walton
e09b447d0d
Move the contents of `gl::device` into `gl`
2019-03-05 14:51:29 -08:00
Patrick Walton
f7a8b573ce
Move the GPU rendering code out of `pathfinder_gl`, since it's now no longer
...
OpenGL-specific
2019-03-05 14:46:18 -08:00
Patrick Walton
dd480feb52
Factor out the GL rendering code into a separate crate
2019-01-30 19:31:29 -08:00