Commit Graph

308 Commits

Author SHA1 Message Date
Rezmason
22f3ab4092 You can now specify the glyph font by name in the URL. 2021-12-21 15:00:15 -08:00
Rezmason
38f29ad21b You can now loop the effect. It's not super great, but it ought to make it easier to create repeating backgrounds or something. 2021-12-21 02:22:20 -08:00
Rezmason
62e9bfea82 Click-to-fullscreen now works with Safari as well. 2021-12-19 23:24:15 -08:00
Rezmason
bdd8782619 The lkg object shouldn't be retrieved from the device or spoofed unless holoplay is enabled. 2021-12-19 22:41:10 -08:00
Rezmason
1a7043a986 Moved looking glass context logic into an "lkgHelper" module. Fixed math issues. 2021-12-19 22:02:19 -08:00
Rezmason
87fa3462ea Add error handling if the holoplay service cannot be reached. 2021-12-19 12:33:29 -08: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
17b6d7b9aa Fixing a math bug in the WGSL rain pass 2021-12-11 23:15:50 -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
508c941fcd The glyph textures can now be rectangular, I think. 2021-12-06 22:44:18 -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
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
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
743ba87e86 Renaming some variables in the rainPass WGSL shader from what they were in the GLSL version. 2021-11-21 00:50:10 -08:00
Rezmason
b540ef4620 Explicitly using rgba8unorm format for rain pass render targets 2021-11-17 18:27:10 -08:00
Rezmason
c0bd6945ed The twilight version flickered an unhealthy amount, so I lengthened its raindrops. 2021-11-15 23:52:39 -08:00
Rezmason
e95d826fb3 Adding huberfish A and D glyph sets; adding palimpsest and twilight versions. 2021-11-15 23:49:19 -08:00
Rezmason
3acce2001e Update README.md to mention WebGPU 2021-11-15 18:21:28 -08:00
Rezmason
b39ae896b5 A temporary fix for the WebGPU detector. Also, Firefox doesn't support GPUQueue::copyExternalImageToTexture yet, so they'll fall back to regl until I work out a temporary alternative for that, too. 2021-11-15 09:19:00 -08:00
Rezmason
d273573348 Non-module scripts are now imported through the JS. It's not pretty, but it keeps the WebGPU project from loading regl unnecessarily. 2021-11-15 08:05:31 -08:00
Rezmason
aa56cc4256 Changed the gpu-buffer imports to use a relative path. 2021-11-15 07:41:33 -08:00
Rezmason
b5d9e106fb prettier has some opinions about bloomPass. 2021-11-15 07:41:18 -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
29329aed7f Messing with the weights in the WebGPU bloom pass's combine shader to better resemble what's in the regl version. 2021-11-15 01:06:10 -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
f907c1c91b Fixing a vague comment that got pasted to all the post processing passes. 2021-11-14 09:04:41 -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
cebd6877bb Just learned about the private storage class. The rain pass can use it to look up the corner positions of quads, rather than derive them mathematically. 2021-11-12 00:03:06 -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
d05cb3928d Discovered an overlooked vertical flip I wasn't performing in the WGSL resurrection shader. 2021-11-11 21:56:44 -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
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
9813e76ffb The stripe pass wasn't properly handling custom colors. 2021-11-11 08:01:43 -08:00
Rezmason
159e205019 Planning out the bloom pass. 2021-11-10 18:10:57 -08:00
Rezmason
dc4032e42a A little reorganization of methods in the passes. 2021-11-10 18:10:26 -08:00
Rezmason
f4130013f4 Moved the makePyramid and resizePyramid methods from the regl solution's util module to bloomPass.
Adding the canvas context's preferred format to the shared pass context (named "canvasFormat").
Added a placeholder bloomPass, which the existing passes now receive input from.
2021-11-09 20:06:59 -08:00
Rezmason
f0f422e933 Only load one solution— regl, or webgpu, not both. This requires dynamic import. 2021-11-09 18:26:00 -08:00
Rezmason
87c2093281 Unifying the interfaces of regl and webgpu makePass and makePipeline. 2021-11-09 09:17:01 -08:00
Rezmason
6586badf42 The WebGPU rainPass now performs a high pass filter on its own fragments. I think I prefer this to a separate high pass filter, because this one is pre-blendfunc, ie. fragments will only be added to the texture if they are individually bright enough to contribute. 2021-11-09 07:08:07 -08:00
Rezmason
786c83cca0 More tweaks to the volumetric mode debug view. 2021-11-08 23:04:08 -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
cf02073ff3 Added orthographic projection and a profile angle to the volumetric mode when effects are off. 2021-11-08 09:47:56 -08:00
Rezmason
11bba1020d Changing my mind a little about how to render the "behind the scenes" version of the effect, in regular and volumetric mode.
An isometric perspective would be neat.
2021-11-08 09:29:04 -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