Commit graph

8 commits

Author SHA1 Message Date
Raph Levien 340ac1d69c Hacky attempt to get running in browser 2022-11-29 19:36:05 -08:00
Chad Brokaw 923765aff9 Address review feedback
* Add comment about avoiding NaNs to inverse alpha divisions
* Change inverse alpha computations to use max(a, epsilon) rather than +
* Emit alpha component in blit fragment shader (enables support for partially transparent windows)
2022-11-28 14:07:26 -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
Chad Brokaw fc1a6e9e4e update for improved kurbo/peniko ergonomics
also removes some annoying lingering tabs from blend.wgsl
2022-11-23 12:50:28 -05: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