Rezmason
b6570de106
Fixed some major bugs: the WebGPU cache should store loaded images and text, never GPU resource handles; renamed renderer "formulate" to "configure"; WebGPU renderer's configure function needs early returns after each major await, in case there's a new config; the render loops are now locally stored closures; renderers now have start and stop functions; fixed bugs in the REGL and WebGPU mirror passes; WebGPU bloom pass now enforces texture dimensions are greater than zero; the react component now stores the renderer type in a useRef and returns early from renderer init awaits to prevent multiple renderers from instantiating.
2025-05-25 03:30:26 -07:00
Rezmason
3b837c6f06
Massive overhaul: the renderers are now classes that implement Renderer; replaced webpack and rollup with vite; converted bundle-contents to "core" and "full" bundle profiles; renamed "inclusions" to "staticAssets", which are "url" base64-encoded images and "raw" text strings; renamed the Matrix component module to the JSX extension; built out a test scaffold at tools/test/index.html to manually test the various deploy options.
2025-05-23 12:49:10 -07:00
Rezmason
658f07c6ab
Code intended to leverage imports in the load functions.
2025-05-20 07:59:20 -07:00
Rezmason
f61a4e29c9
Added cache check to WebGPU renderer's loadShader method. Un-commented entries into config.js. Inclusions are now explicit dynamic import lambdas, so the cache functions can detect and call them; however, webpack and rollup seem to use them differently.
2025-05-20 07:57:27 -07:00
Rezmason
eea341f50c
Exploring ways to preserve the vanilla JS browser demo without compromising on the bundle. Experimenting with embedding images in the bundle as data URIs
2025-05-06 12:59:02 -07:00
Rezmason
f3cd449c7d
Added WebGPU support and added caching to the WebGPU version.
2025-05-05 19:07:36 -07:00
Rezmason
237990b44c
Ran the format script
2025-05-05 08:52:35 -07:00
Rezmason
e8be232e9b
Fixing several embarrassing bugs.
...
WebGPU and REGL projects now flipY again, and they properly flip the symbolY glyph coordinate in the rain pass's fragment shader.
Switching on some older code that was disabled for FF Nightly support— it makes more sense to wait for that support as implementations finalize.
Added mipmap to images loaded into REGL project.
2022-10-11 09:25:24 -07:00
Rezmason
b86b97fde9
Adding an FPS argument. The renderers now determine whether the current frame should be rendered, and passes use that to determine whether to render or not. The rain pass, however, will still update the simulation at full speed.
2022-10-03 23:45:56 -07:00
Rezmason
9c2d6d7ed8
Adding "glint", the shapes that appear on top of the glyphs in the Resurrections opening titles.
2022-09-17 01:24:23 -07:00
Rezmason
ec831ce6f1
Adding named debug groups to the WebGPU passes, and switching the pipeline create calls to the async methods
2022-09-11 20:09:32 -07:00
Rezmason
a0c1f22fd1
Updating WebGPU project to satisfy Chrome Canary
2022-08-07 19:17:22 -07:00
Rezmason
a4a0406826
Ran prettier.
2022-05-04 17:42:50 -07:00
Rezmason
a6c88913f5
A pipeline is now an object with a build method and a run method. The build method returns the last step's outputs object.
2022-05-03 12:07:54 -07:00
Rezmason
928067996d
The primary and bloom textures are now combined with a weight so that fainter bloom doesn't create a fainter overall effect.
2021-12-24 21:44:16 -08:00
Rezmason
25e9f10f69
Adding "updated" glyph set from The Matrix Resurrections, and a corresponding effect version.
2021-12-11 22:21:24 -08: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
d19f78319b
Rewrite loadTexture, for now, to use GPUQueue::writeTexture (from data supplied by a CanvasContext2D) instead of GPUQueue::copyExternalToTexture (from createImageBitmap).
2021-12-04 15:40:33 -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
9ad655ca2e
Created a pass-through post processing compute pass. The other post-processing passes will be changed over to this kind of thing.
...
makePassFBO has now been split into makeRenderTarget and makeComputeTarget.
2021-11-11 09:18:32 -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
87c2093281
Unifying the interfaces of regl and webgpu makePass and makePipeline.
2021-11-09 09:17:01 -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
bbe3d62331
Wrote another utility method for cramming an array of resources into a bind group.
2021-11-08 08:05:56 -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
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
f0ae7731bb
The webgpu project's multi-pass pipeline is borrowed from the regl project, but the outputs don't exist yet. Outputs will be tricky, because RTTs are thrown out and recreated when the canvas resizes, which I think means all the bind groups referencing the old texture have to be destroyed and recreated, too.
2021-11-03 21:42:01 -07:00
Rezmason
0b04947425
Implemented makePass(). Moved rain compute and render stuff into a pass.
2021-11-03 21:30:22 -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
8048c9c690
That's funny, you can blob a fetch response and chuck it into createImageBitmap().
2021-11-02 23:19:54 -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