Commit Graph

113 Commits

Author SHA1 Message Date
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
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
c27c20f2cf Consolidating all the bind groups, because I only have four. Stuff shared between render passes will get isolated somehow, but it might be by binding one buffer to multiple render passes' bind group at zero rather than having more than one bind group. 2021-10-27 21:08:20 -07:00
Rezmason
a0649bdb34 Added screenSize in camera uniforms. 2021-10-27 20:51:22 -07:00
Rezmason
f2a54b3141 A little bit of shader variable renaming and const declaration during a walkthrough of the existing code on-stream 2021-10-27 20:00:39 -07:00
Rezmason
c716d30808 Merged the vertex and fragment shader WGSL files, because their bindings can't collide anyhow. The rain render shader now accepts a bind group of time uniforms, which change on every frame, as well as MSDF uniforms, along with an MSDF sampler and texture that's loaded in from the PNG. The shader currently renders the correct grid of quads for volumetric mode, displays the first glyph raw in each one, and every sixty frames, turns on and off the blue channel. 2021-10-27 19:04:02 -07:00
Rezmason
8c62146884 Fetching WebGPU shaders. Created my first bona fide pipeline. The vertex shader compares the built-in vertex index and the numRows/numColumns uniforms to produce a grid of quads with no vertex or index buffer whatsoever! 2021-10-27 19:04:02 -07:00
Rezmason
1827fd94a6 Removing document onload function from webgpu_main that I left in by mistake 2021-10-27 19:04:02 -07:00
Rezmason
3cb20139c4 Creating stump render bundle array. This is how WebGPU command buffers are created and executed. 2021-10-27 19:04:02 -07:00
Rezmason
6b317af0bb Broke ground on webgpu version.
Split regl_main.js off of main.js, which now detects navigator.gpu. If it exists, it initializes webgpu_main instead.
2021-10-27 19:04:02 -07:00
Rezmason
48a6f2cf34 Fixing a typo and adding looping functionality to the TODO list 2021-10-27 19:03:38 -07:00
Rezmason
348c384de5 More small config tweaks to paradise matrix. 2021-10-23 01:54:09 -07:00
Rezmason
7f42280eeb More small config tweaks. 2021-10-23 01:38:05 -07:00
Rezmason
69d4e7365c Renaming the shaders again, because the extensions I gave them were confusing GitHub's syntax highlighting. 2021-10-23 01:28:32 -07:00
Rezmason
a979e87564 More tweaks to Resurrections version. 2021-10-23 01:12:50 -07:00
Rezmason
cf5f8c2113 Simplifying rainPass.compute's weirder operations. 2021-10-23 01:12:31 -07:00
Rezmason
2265e3c937 Performing extensive cleanup and adding comments to rainPass.compute 2021-10-22 23:44:45 -07:00
Rezmason
af44126926 Renaming the data texture to "state" in the rain pass's render program 2021-10-22 22:58:10 -07:00
Rezmason
5c77e9b690 Renaming a value in highPass.frag 2021-10-22 22:57:37 -07:00
Rezmason
edc9bca0bc Removing accidental junk function from utils 2021-10-22 22:57:22 -07:00
Rezmason
1a97861fed Resurrections version now vertically spaces the glyphs (groan). 2021-10-22 22:57:14 -07:00
Rezmason
6d8f5ba41a Overhauled the rainPass's support for the "operator" version of the effect. It now overrides the brightness of any glyph brighter than a threshold, which I think is a much clearer concept.
Also changed the way the glyphs cycle in the "operator" version, after noticing they only change once every four or five frames in the original effect.
2021-10-22 08:38:37 -07:00
Rezmason
7569246b5b Renaming rainPass shaders, and updating TODO. 2021-10-22 00:48:49 -07:00
Rezmason
d285697640 Documenting the passes and config variables. 2021-10-20 21:50:01 -07:00
Rezmason
4c6ff879fd Added some documentation, cleaned up some code, fleshed out the remaining work to make the project a little easier for newcomers to approach 2021-10-20 21:01:32 -07:00
Rezmason
b4bece1264 resurrectionPass wasn't waiting for its shader to load. 2021-10-20 14:00:55 -07:00
Rezmason
b2f81cdb37 Oops, fixing the URLs for the shaders 2021-10-20 13:49:50 -07:00
Rezmason
f6e12ad795 Renaming renderer to rainPass, renaming its shaders, and cleaning up the main code a little. 2021-10-20 09:58:03 -07:00
Rezmason
c85642a270 A little more cleanup in the renderer code. 2021-10-20 09:50:58 -07:00
Rezmason
28d38b032f More code cleanup. Replacing Neapolitan ice cream stripes with trans flag stripes. 2021-10-20 09:19:06 -07:00
Rezmason
4e88f68560 Whitespace fixes. 2021-10-20 08:26:16 -07:00
Rezmason
91deea34d6 Ran all the JS through prettier. 2021-10-20 03:25:04 -07:00
Rezmason
d8a1409907 Pushed virtually all the shader source into shader files that load as assets. 2021-10-20 03:20:46 -07:00
Rezmason
39742d73f3 Shaders can now be loaded in similar to textures 2021-10-20 02:04:31 -07:00
Rezmason
5902ecc625 Renaming some variables 2021-10-20 01:13:55 -07:00
Rezmason
7ec03bbeb1 Beginning to explore adding loop support. Permitting the effect to loop makes it easier to generate looping video. 2021-10-20 00:14:49 -07:00
Rezmason
3630c6adb0 Tuning the resurrections version. 2021-10-20 00:13:55 -07:00
Rezmason
80f5aea2a3 Adding support for "resurrecting" volumetric code, which is rendered to a separate channel and can be given separate colors. 2021-09-19 21:52:04 -07:00
Rezmason
f17281ab4d Adding notes to support some recent variations on the Matrix code rain seen in Matrix Resurrection promotional material. 2021-09-19 21:51:42 -07:00
Rezmason
70d04b2b50 Cleaned up some code in the renderer. 2021-09-12 00:51:20 -07:00
Rezmason
7910ca0553 Added backgroundColor support and improved stripe colors handling in config. 2021-09-12 00:50:51 -07:00
Rezmason
51f1b6ebf5 Updating the README.md. Renaming "threedee" to "volumetric". 2021-09-06 17:23:54 -07:00
Rezmason
99591e1186 Old and new matrix rendering now coexist. 2021-09-06 16:35:44 -07:00
Rezmason
4add0c3324 The renderer now accepts a density parameter, that multiplies the columns.
Glyph depth now impacts brightness.
Raindrops now move forward at a steady speed.
2021-09-05 21:58:00 -07:00
Rezmason
7973a11fd7 Added transform and camera matrices to the vertex shader. The matrix renderer's update shader now specifies a depth for every glyph. 2021-09-05 18:38:48 -07:00
Rezmason
cfc9a08dbe Adding glMatrix to the project. 2021-09-05 15:52:54 -07:00
Rezmason
cfadbe145c Bloom pass can now be disabled. 2021-09-05 15:52:42 -07:00
Rezmason
e570af5bc8 Glyphs now blend additively, and the renderer's output buffer is cleared before it's drawn to. 2021-09-03 22:59:35 -07:00
Rezmason
4e2c18d375 Glyphs in the renderer are now independent quads. 2021-09-03 22:34:46 -07:00
Rezmason
6708ab03a7 Came up with some performance improvements. Hopefully this will help it run better on more machines leading up to the sequel coming out. 2021-07-11 18:18:13 -07:00