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 |
|
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
|
bbe3d62331
|
Wrote another utility method for cramming an array of resources into a bind group.
|
2021-11-08 08:05:56 -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
|
a4e08c0ceb
|
Refining gpu-uniforms warnings, which are now only emitted if requested. Hypothetically a user could call write() on the ArrayBuffer to update only some of its values.
|
2021-11-08 03:08:25 -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
|
8f226be368
|
Wrote some code to parse structs in a WGSL shader, calculate its fields' offsets into an ArrayBuffer, generate a JS object that represents it, and write such a JS object to an ArrayBuffer.
|
2021-11-08 01:13:42 -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
|
335ff5ddb7
|
The main module can now pick a renderer based on the "renderer" URL parameter.
|
2021-11-06 05:03:38 -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().
render-to-canvas-wgsl
|
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
|
8f09fade43
|
Contemplating my next steps.
|
2021-11-02 23:20:54 -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
|
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!
webgpu-ping-pong
|
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 |
|
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
|
923992660c
|
Ported the rain fragment shader to wgsl. Made a small change in both to the function that resolves the glyph symbol float to the coordinate of a glyph in the MSDF texture.
|
2021-10-30 14:49:06 -07:00 |
|
Rezmason
|
4dd0c1be50
|
Organizing shader functions' input and output types. I don't know if this is a good idea in the long run, but it seems useful in the short term.
|
2021-10-30 13:50:46 -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
|
1516f82554
|
Adding random functions to rain render pass shader
|
2021-10-30 08:41:00 -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
|
94f5f1e5ec
|
Rearranging the shaders and scripts to hopefully make the project easier to work on
|
2021-10-29 09:27:28 -07:00 |
|
Rezmason
|
dd4fe3cac6
|
Looks like uniform buffers don't need to specify which shader stages use them.
Removed the primitive state from the pipeline descriptor, because the project uses its default values.
|
2021-10-29 09:20:37 -07:00 |
|
Rezmason
|
fb6406e753
|
The texture sampler should operate linearly
|
2021-10-29 09:16:28 -07:00 |
|
Rezmason
|
23d397fa11
|
Now that I can pack integer and float data into one uniform buffer, time.seconds can be represented as a float while time.frames is an integer.
|
2021-10-29 09:02:20 -07:00 |
|
Rezmason
|
f9b80224fe
|
More std140 tweaks
|
2021-10-29 08:57:23 -07:00 |
|
Rezmason
|
d4b21a0e4c
|
Moving std140 code to its own module. Here it can evolve into a class or whatever, and it won't clutter the rest of the code.
|
2021-10-29 08:03:55 -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
|
ad2b7e53af
|
buildStruct needs to convert values into arrays
|
2021-10-28 23:56:31 -07:00 |
|
Rezmason
|
1b53b8be1f
|
Experimenting with simplifying the names of the uniform buffers in the rain render pass shader.
|
2021-10-28 22:21:01 -07:00 |
|