Commit Graph

21 Commits

Author SHA1 Message Date
Rezmason
0a5daa696a gpu-buffer now eliminates whitespace from types before identifying them 2022-09-11 20:09:59 -07:00
Rezmason
3da3db61f1 Camera input and mirror effect now also work in WebGPU. Added the "once" parameter, which renders a single frame. Fixed bugs in gpu-buffer. 2022-08-11 00:08:05 -07:00
Rezmason
5b6062fce4 Update regl to support uniform arrays 2022-08-02 03:41:29 -07:00
Rezmason
a4a0406826 Ran prettier. 2022-05-04 17:42:50 -07:00
Rezmason
e39c26a95a The delimiter between WGSL struct fields is now a comma, which is also the delimiter between parameters in angle brackets, so gpu-buffer needs to be a little cleverer with the lines it separates. 2022-04-30 18:16:33 -07:00
Rezmason
dfef272246 Binding syntax changes 2022-04-30 18:16:33 -07:00
Rezmason
2364bbc8bc rainPass now renders multiple cameras and viewports, using data from the hardware.
Added quiltPass (which uses holoplay’s quilting shader).
Added a holoplay effect version. (Versions can also now specify a preferred renderer.)
2021-12-19 12:08:31 -08:00
Rezmason
68ad689e1e They removed [[block]] from WGSL struct declarations. 2021-12-14 23:01:53 -08:00
Rezmason
910d29e175 Poking gpu-buffer a bit because I'm apparently afraid of writing a blur shader which I've already written once. 2021-11-11 23:30:37 -08:00
Rezmason
a143e3fc03 Renamed gpu-uniforms to gpu-buffer, and messed around with its API.
I believe all the align, size, stride and byteOffset values are now in the proper units, ie. bytes.
2021-11-08 22:56:00 -08:00
Rezmason
bd17549619 I believe I've added support for generating the array buffer for layouts ending in runtime-sized arrays to gpu-uniforms.js. 2021-11-08 09:15:00 -08:00
Rezmason
5747fb74a3 Fixing what I think was a stride bug in gpu-uniforms. This library seriously needs some extensive unit testing. 2021-11-08 09:09:12 -08:00
Rezmason
6ab16b3091 Trying to implement the spec for the alignment and size of struct and array fields in gpu-uniforms. 2021-11-08 08:58:55 -08:00
Rezmason
a4e08c0ceb Refining gpu-uniforms warnings, which are now only emitted if requested. Hypothetically a user could call write() on the ArrayBuffer to update only some of its values. 2021-11-08 03:08:25 -08:00
Rezmason
415ffa77ee Driving more uniforms.read calls from the actual shaders. 2021-11-08 03:01:46 -08:00
Rezmason
61a3a6d783 Moved the WebGPU code off of "std140" and onto gpu-uniforms. 2021-11-08 02:23:33 -08:00
Rezmason
8f226be368 Wrote some code to parse structs in a WGSL shader, calculate its fields' offsets into an ArrayBuffer, generate a JS object that represents it, and write such a JS object to an ArrayBuffer. 2021-11-08 01:13:42 -08:00
Rezmason
3d9050c9aa Upgraded glMatrix to the latest version, which contains mat4.perspectiveZO, the perspective function that works for WebGPU. 2021-10-27 22:45:01 -07:00
Rezmason
cfc9a08dbe Adding glMatrix to the project. 2021-09-05 15:52:54 -07:00
Rezmason
a760d6854a Rebuilt on top of REGL. 2020-01-21 12:17:17 -08:00
Rezmason
8c60365279 Initial commit 2018-08-23 17:30:39 -04:00