Commit Graph

82 Commits

Author SHA1 Message Date
Rezmason
58e3aac143 Replacing "logarithmic brightness" with a simple brightness-and-contrast setup. Adjusting a bunch of configs. 2022-09-04 23:48:34 -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
a0c1f22fd1 Updating WebGPU project to satisfy Chrome Canary 2022-08-07 19:17:22 -07:00
Rezmason
ad81de744d Renamed ripples pass to mirror pass 2022-08-02 21:25:54 -07:00
Rezmason
3e301e9e58 code brightness is now intensified by the ripples. Added webcam support. 2022-08-02 09:56:13 -07:00
Rezmason
25255599aa Replaced the sudden sine ripple with a sin(x)/x offset by elapsed time. 2022-08-02 04:12:52 -07:00
Rezmason
503c97adeb Ripples pass now supports five simultaneous clicks; the ripples are circular, accounting for the aspect ratio; click event is handled within the ripples pass module. 2022-08-02 03:42:36 -07:00
serge
d910e2e49d animation length 2022-08-01 19:05:51 +10:00
serge
ed2fff88a8 onclick ripple 2022-07-30 17:37:34 +10:00
serge
65d0380bde 2/3 2022-07-29 19:54:52 +10:00
serge
b64f7c247a test 2022-07-07 19:47:44 +10:00
serge
c2eb3d0602 not bad for first time 2022-07-05 05:24:38 +10: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
e8458a1304 Arithmetic assignment operators were added 2022-04-30 18:16:33 -07:00
Rezmason
dfef272246 Binding syntax changes 2022-04-30 18:16:33 -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
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
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
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
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
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
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
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
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
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
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
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
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
b31e70c1e1 Removing the channel override in the vertex shader. 2021-11-02 07:35:19 -07:00
Rezmason
4294932d5f Fixed the flickering leftmost column. 2021-11-01 08:49:33 -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
53e1c5502c There's no existing infrastructure for WGSL yet, so to clean up the shader I'm making do with some simple greps and short-term meticulousness. 2021-10-30 23:18:39 -07:00