Commit Graph

75 Commits

Author SHA1 Message Date
Rezmason
9b8d5b34b5 Added an IcoMoon font for the expanded glyph set 2022-09-09 00:10:05 -07:00
Rezmason
ed49105c69 Cursors are now much more robustly detected, and the debug view— previously called the computation texture— now resembles BUF's behind-the-scenes VFX footage. Isolated the isometric camera option from the debug view 2022-09-08 23:13:52 -07:00
Rezmason
77d6176fd5 Updating the WebGPU code to match the REGL code 2022-09-08 19:51:39 -07:00
Rezmason
2eb7b70926 Split the rain pass's compute shader in two, with one governing brightness and the other governing glyph cycling. This allows glyphs to randomly cycle properly, and leaves room to store new properties. 2022-09-07 22:05:03 -07:00
Rezmason
76d37fc752 Freeing up a rain pass channel 2022-09-06 23:23:39 -07:00
Rezmason
bfa18d6926 Updated the Resurrections MSDF texture 2022-09-06 01:08:47 -07:00
Rezmason
17b0e11cb7 Expanding the to-do list to include audio, regenerated "updated glyph set, Playdate version, reformulation goals and Resurrections version 2022-09-04 23:34:09 -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
e024f4bd4d Add camera setup to WebGPU project 2022-08-07 21:29:50 -07:00
Rezmason
b56f63b74b Fixing the asterisk glyph in the font and glyph sets.
Adding the megacity glyph to the font and added a megacity glyph set.
Fixed a bug in the rain pass's fragment shader that caused glyphs in the last column to go missing
2022-04-28 18:18:15 -07:00
Rezmason
577e94c7d1 Moving bloomPass's pyramids off of mipmaps fixes its appearance in Firefox Nightly 2021-12-06 07:34:04 -08:00
Rezmason
9896e2da84 Fixing a Firefox Nightly issue in the rain pass. 2021-12-05 22:58:32 -08:00
Rezmason
e27c1820cb Figuring out what's wrong in FF Nightly 2021-12-05 19:30:49 -08:00
Rezmason
b540ef4620 Explicitly using rgba8unorm format for rain pass render targets 2021-11-17 18:27:10 -08:00
Rezmason
3e6196a964 A merge into master revealed some problems with the way ES modules are imported. This will require some investigation. 2021-11-15 01:35:05 -08:00
Rezmason
b26155d20e Adding some more comments. Destructuring the context object in the pass modules. A little code cleanup in bloomPass. Changing the endPass sampler to be cheaper. 2021-11-15 01:05:05 -08:00
Rezmason
1b61e304a5 Refactoring the pass and pipeline, so that inputs and size are handed to and returned from the build function (formerly setSize). This is now the earliest place to build bind groups, which makes sense, because it's also the earliest place to create textures that are proportional to the size of the canvas. 2021-11-15 00:30:09 -08:00
Rezmason
b0a4acdfdb Rewrote the WebGPU bloom pass based on the classic Unreal solution of blurring and combining the levels of an image pyramid. Fixed the regl bloom pass to use the downscaled blurred mipmap levels to build the first pyramid. 2021-11-14 23:09:29 -08:00
Rezmason
7eecace634 My friend recommended a much simpler blur that doesn't build any image pyramids. Unfortunately my work towards an implementation isn't very promising— it doesn't pack the same wollop as the WebGL version— but I can built my pyramids on top of it. 2021-11-13 21:25:27 -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
db928bbe7a All the post processing passes are now based on compute pipelines instead of render pipelines. 2021-11-11 21:50:27 -08:00
Rezmason
9c861fd50b Replacing the final copyToTexture call with a tiny render pass, so that the postprocessing passes can be compute shaders working off of storage textures instead. 2021-11-11 08:24:30 -08:00
Rezmason
dc4032e42a A little reorganization of methods in the passes. 2021-11-10 18:10:26 -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
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
1528ca39a5 Commenting out the tables and adding select to some shaders in place of the original ternary operator. 2021-11-08 03:45:06 -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
bd3d0c76d2 Fixing the names of shaders in the passes. The loadShader utility function now returns the code and the module, since I'm hoping to parse uniform buffer layouts from the code. 2021-11-07 00:41:25 -07:00
Rezmason
bade1667ad Making some comments in the WebGPU rainPass and changing the "effect=none" view to be easier on the eyes. 2021-11-06 15:19:56 -07:00
Rezmason
89b9f4e363 Ported all the post processing regl passes to WebGPU. Fixed the CORS stuff in loadTexture. Renamed createRenderTargetTexture to makePassFBO, to conform with the regl project. Added make1DTexture, which stripePass uses. 2021-11-06 05:03:16 -07:00
Rezmason
230847e5b8 Added runtime texture targets. A pass now returns its resources in getOutputs(), which subsequent passes access as getInputs(). 2021-11-05 01:06:39 -07:00
Rezmason
f8959cd7d9 Renaming msdfSampler to linearSampler; adding loadShaderModule utility method; busting the rain render out of its render bundle (which won't be useful long-term). 2021-11-03 20:01:59 -07:00
Rezmason
8f09fade43 Contemplating my next steps. 2021-11-02 23:20:54 -07:00
Rezmason
348b07d237 Actually the ping-pong setup isn't necessary for this compute shader, since it does everything in-place.
Undid all the y-flips I could find, and they all canceled one another out, except for the glyph UVs in the fragment shader.
2021-11-01 08:38:48 -07:00
Rezmason
6460f4401a Ported the rain compute shader to wgsl. Tons of inverted-y errors abound. 2021-11-01 01:52:57 -07:00
Rezmason
1c1b1e4f03 We have ping-pong! And all the rain pass's shaders can coexist in one module! And I met and received ample help from @kainino0x and others on the WebGPU Matrix chat! 2021-11-01 00:29:16 -07:00
Rezmason
6f58882851 The MSDF stuff shouldn't be in its own uniform buffer. This is basically config stuff.
Added a compute pass that currently does nothing while I learn how to make use of it.
2021-10-31 20:00:11 -07:00
Rezmason
375560d6a1 Fixed a math issue in the symbol UV function. 2021-10-30 20:30:55 -07:00
Rezmason
4ea6cadd2f Fixing some y-flip related stuff in the rain pass fragment shader. Consolidating and changing the type of a bunch of info in the config uniform. Improving the code comments. 2021-10-30 20:05:07 -07:00
Rezmason
d8701c9408 Ported the rain vertex shader to wgsl. 2021-10-30 18:07:07 -07:00
Rezmason
cc75938fcb Passing all the rain pass configs through a giant struct into the rain shader. I've included the compute shader fields, because I have hope that the compute pass can use the same shader module. 2021-10-30 13:48:28 -07:00
Rezmason
33437a722d Finding ways to construct WebGPU descriptors more concisely. Moving some functions to webgpu's utils.js. 2021-10-30 08:40:42 -07:00
Rezmason
0c26cc7660 Moving assets into a subdirectory. 2021-10-29 12:21:40 -07:00
Rezmason
fb6406e753 The texture sampler should operate linearly 2021-10-29 09:16:28 -07:00
Rezmason
f9b80224fe More std140 tweaks 2021-10-29 08:57:23 -07:00
Rezmason
e79e741fcf Fixed a struct layout bug. Struct layout and builder now support mixing integer and float data in a struct, and output an ArrayBuffer. 2021-10-29 07:43:39 -07:00
Rezmason
81f77c70ae Slowly working out what's required to support uniform buffers that store integers as well as floats 2021-10-29 00:38:58 -07:00
Rezmason
c3254c3aa1 Adding WebGPU to TODO.md. Annotating the parts of the WebGPU code that involve uniform buffer layout issues. 2021-10-27 22:34:47 -07:00
Rezmason
48a6f2cf34 Fixing a typo and adding looping functionality to the TODO list 2021-10-27 19:03:38 -07:00