Commit graph

17 commits

Author SHA1 Message Date
Chad Brokaw 942817755c replace let with const on web 2022-12-08 11:53:35 -05:00
Raph Levien 340ac1d69c Hacky attempt to get running in browser 2022-11-29 19:36:05 -08:00
Raph Levien e8f8ebbd14 Squeeze pipeline to fit
This commit reduces the workgroup shared memory of binning to fit in
16k (by packing two u16's in a u32), and moves the config binding to
uniform, from readonly storage.

Progress toward #202
2022-11-29 17:23:12 -08:00
Chad Brokaw d13ec497e2 Address review feedback.
* add comment for ClipInp::path_ix
* update comment for SceneBuilder drawtags
* remove copy of blend data through info buffer. Instead, update EndClip's DrawMonoid::scene_offset to point to the same scene data of the associated EndClip.
2022-11-29 14:52:03 -05:00
Chad Brokaw 28082af9ec clip changes/blend group alpha
Adds blend group alpha. Also changes the clip logic to sync blend mode and alpha from BeginClip to EndClip in clip_leaf.
2022-11-29 13:28:25 -05:00
Raph Levien 09aa38799d More cleanup
Missed a few cases (and I'm still not 100% sure I've got them all).
2022-11-25 09:51:11 -08:00
Raph Levien 94a310a245 Clean up unneded type annotations in vec
Now that wgsl-analyzer 0.6 is released, most explicit type annotations on vec can be dropped (the exception being when it is a type conversion).

Also changes mix to select when the selector is actually boolean.
2022-11-25 09:37:11 -08:00
Daniel McNab 7d5063b187
Remove all wgsl-analyzer errors (#210)
* Fix missing import

* Format
2022-11-25 16:43:21 +00:00
Elias Naur 18c0da02e5
Clarify licensing for WGSL shaders (#205)
As stated by the README, the intention is for the shaders to be
provided under the terms of the Unlicense in addition to the MIT
and Apache-2.0 licenses.

While here, add a self-contained UNLICENSE file to replace the
external reference to unlicense.org.
2022-11-19 16:45:42 +00:00
Chad Brokaw adc9811776 add clips and blends 2022-11-18 17:26:26 -05:00
Raph Levien 494f523c41 Tiger!
Still one flaw, fat lines aren't expanded with strokes in path coarse rasterization. But that's a small visual ding, and can be fixed

That said, there is some really strange stuff going on in tile_alloc. It's using storage to do a uniform broadcast (the result of bump allocation for the workgroup), which is not great at all. It should be using workgroup storage, but on my mac it behaves as if the workgroup barrier is not in place. Investigating.
2022-11-04 21:41:37 -07:00
Raph Levien c3d81e0985 Mostly working path rendering
It draws multiple paths and applies affine transformations.

One problem: RGBA writing is byte-reversed and premultiplied.
2022-11-04 08:59:23 -07:00
Raph Levien 06fa3cb9ab Checkpoint
Felt like checkpointing what I have before trying to run the pipeline. Theoretically everything should work.
2022-11-03 19:37:38 -07:00
Raph Levien 5851ef1417 Shaders loaded
This checkpoint loads the shaders for full rendering, but there's a bunch of stuff still needing to be done.
2022-11-03 16:53:34 -07:00
Raph Levien 40416fd2ea Another checkpoint 2022-11-01 13:55:58 -07:00
Raph Levien 06ec395b68 Checkpoint coarse rasterization
The bones of coarse rasterization are in place (so far, fills only). Still not suitable for end-to-end (need to generate bounding boxes, among other things), but getting closer.
2022-11-01 13:55:58 -07:00
Raph Levien b6da6d958b Write more shaders
This is super WIP, but represents partially written shaders for more of
the piet-gpu pipeline. Checkpointing as other work is incoming.
2022-11-01 13:55:58 -07:00