-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGPURenderer: StorageTexture #26769
Conversation
Ok, then I'll be patient and wait for r157. |
@Spiri0 Can this example already help with your project? |
Yes very, this is my topic: With r156 I also created the butterfly texture (pages 26 and 40) and the init spectras. This works very well with the node system and wgslFn. For the butterfly texture I only had to write my own bit-reverse fn but these are minor obstacles. The textures look exactly like in the paper. The only thing I was missing was the textureStore functionality before r156. I could have done the pingpong mechanic thing more complicatedly with two separate shaders, but with the pingpong possibility it's cleaner. I have this IFFT ocean since may in WebGL2, but with lots of render targets. But now I want to do all of this with computer shaders. Phil Crowther inspired me to do this because he has been looking for a gpu IFFT ocean for a longer time. Once I've finished it, he can add it as a module in three.js. |
Is this how Screen.Recording.2023-09-20.at.4.31.26.PM.mov |
This looks good. It looks similar to what I have already implemented in WebGL2 with renderTargets. You probably used the noise pattern that I saw in the r157 example, but that's a user matter. The mechanism certainly looks correct. To us it just looks like noise. However, for the Fourier mechanism, these are numerous different wavelengths that evolve over time. The thing with the StorageTexture was a great idea. I wonder if you or sunag are aware that you have essentially made the DataTexture, which generates the textures on the CPU side, superfluous with the StorageTexture. In any case, I only see advantages in the StorageTexture. |
Improved the example to make it more visually appealing in d6c8dd0 |
commit 181e04e Author: Mr.doob <[email protected]> Date: Fri Sep 29 00:10:20 2023 +0900 r157 commit cabaf21 Author: Mr.doob <[email protected]> Date: Fri Sep 29 00:08:47 2023 +0900 Updated builds. commit 1c85c95 Author: Mr.doob <[email protected]> Date: Thu Sep 28 23:41:31 2023 +0900 Improved USDZLoader example. commit d6c8dd0 Author: Mr.doob <[email protected]> Date: Thu Sep 28 22:53:05 2023 +0900 Improved compute texture examples. commit f886330 Author: GitHubDragonFly <[email protected]> Date: Thu Sep 28 03:23:34 2023 -0400 USDZ Loader - texture scale + offset + rotation (mrdoob#26861) commit cb64471 Author: Levi Pesin <[email protected]> Date: Thu Sep 28 04:55:58 2023 +0930 Nodes: Fix `addLightNode` in case of anonymizing classes (mrdoob#26858) * Fix `addLightNode` in case of anonymizing classes * Address comment * Update AmbientLightNode.js * Update DirectionalLightNode.js * Update HemisphereLightNode.js * Update IESSpotLightNode.js * Update PointLightNode.js * Update SpotLightNode.js * Fix commit 688b749 Author: sunag <[email protected]> Date: Wed Sep 27 13:42:29 2023 -0300 WebGLNodeBuilder: Fix Multi-Material (mrdoob#26841) commit bf7a89e Author: mrdoob <[email protected]> Date: Wed Sep 27 20:33:38 2023 +0900 Fixed DeepScan issue. commit 285c9b6 Author: YX <[email protected]> Date: Wed Sep 27 16:32:50 2023 +0800 Update SpriteMaterial.html (mrdoob#26855) Fixed incorrect Chinese translation. commit 5c00457 Author: 郭斌勇 <[email protected]> Date: Wed Sep 27 16:26:37 2023 +0800 CurvePath: Use correct line type in `closePath()`. (mrdoob#26850) * fix mrdoob#26849 * Update CurvePath.js --------- Co-authored-by: Michael Herzog <[email protected]> commit 083be57 Author: Shuhei Aoyama <[email protected]> Date: Wed Sep 27 15:53:03 2023 +0900 GLTFLoader: Fix to handle reject on afterRoot (mrdoob#26852) commit 2d1695e Author: Levi Pesin <[email protected]> Date: Wed Sep 27 04:57:29 2023 +0930 Nodes: Fix `addNodeClass` and `addNodeMaterial` in case of renaming classes (mrdoob#26846) commit 6a5d6de Author: sunag <[email protected]> Date: Tue Sep 26 16:13:03 2023 -0300 StorageTexture: Adds support for other formats. (mrdoob#26842) * TimeNode: Define `frameId` as integer * Renderer: Set `info` as public * StorageTexture: Adds support for other formats. * Update example to `temporal blur` * fix device in getFormat() commit 9fe5ed2 Author: sunag <[email protected]> Date: Tue Sep 26 16:10:10 2023 -0300 TSL: Fix include one function under another. (mrdoob#26844) * TSL: Fix include one function under another. * Add include example commit ca5c7cb Author: sunag <[email protected]> Date: Tue Sep 26 16:09:42 2023 -0300 Examples: Rename some WebGPU Compute examples (mrdoob#26845) * webgpu_compute -> webgpu_compute_points * webgpu_audio_processing -> webgpu_compute_audio commit 379038f Author: sunag <[email protected]> Date: Tue Sep 26 01:27:04 2023 -0300 WebGPURenderer: Fix .flipY example commit 2ccc5bc Author: sunag <[email protected]> Date: Mon Sep 25 23:54:10 2023 -0300 Nodes: Rename `construct()` to `setup()` (mrdoob#26840) * Nodes: Rename `construct()` to `setup()` * deprecated alert commit e2f5911 Author: sunag <[email protected]> Date: Mon Sep 25 23:45:33 2023 -0300 WebGPURenderer: GPU FlipY (mrdoob#26818) * GPU FlipY * use tempTexture.destroy() * fix name * Rename to `WebGPUTexturePassUtils` and `_getPassUtils()` commit 0f65abb Author: sunag <[email protected]> Date: Mon Sep 25 22:51:02 2023 -0300 TextureNode: Rename `.getTextureMatrix()` -> `.getTransformedUV()` (mrdoob#26839) commit 8d241a6 Author: Marco Fugaro <[email protected]> Date: Tue Sep 26 02:51:33 2023 +0200 Examples: Remove import maps polyfill (mrdoob#26836) commit 1a67ba7 Author: sunag <[email protected]> Date: Mon Sep 25 18:25:00 2023 -0300 RenderNodes: Fix `context.material` reference. (mrdoob#26838) commit 15e4656 Author: Sachin S <[email protected]> Date: Mon Sep 25 04:39:03 2023 -0400 DragControls: Add `recursive` property. (mrdoob#26747) * add recursive property to DragControls * Update DragControls.js Clean up. --------- Co-authored-by: Michael Herzog <[email protected]> commit 43d68fc Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Sep 25 10:38:50 2023 +0200 Update github/codeql-action digest to 6a28655 (mrdoob#26833) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 10e8823 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Sep 25 10:38:42 2023 +0200 Update actions/checkout digest to 8ade135 (mrdoob#26832) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit e857553 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Sep 25 00:14:05 2023 +0000 Update devDependencies (non-major) (mrdoob#26834) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 53c642e Author: Michael Herzog <[email protected]> Date: Sun Sep 24 11:28:27 2023 +0200 Docs: Clean up. (mrdoob#26831) commit 53ee377 Author: Guilherme Avila <[email protected]> Date: Sun Sep 24 06:22:08 2023 -0300 EXRExporter: implements support for DataTexture export (mrdoob#26810) * EXRExporter: DataTexture support Signed-off-by: Guilherme Avila <[email protected]> * EXRExporter: update API & docs Signed-off-by: Guilherme Avila <[email protected]> * Examples: add misc_exporter_exr Signed-off-by: Guilherme Avila <[email protected]> * fix MIME-type Signed-off-by: Guilherme Avila <[email protected]> * update DataTexture usage example Signed-off-by: Guilherme Avila <[email protected]> * update screenshot Signed-off-by: Guilherme Avila <[email protected]> --------- Signed-off-by: Guilherme Avila <[email protected]> commit c3a746a Author: Isaac Mason <[email protected]> Date: Sun Sep 24 18:30:05 2023 +1000 docs: add recast-navigation-js to libraries and plugins page (mrdoob#26828) commit 89e698f Author: Mugen87 <[email protected]> Date: Sat Sep 23 19:39:04 2023 +0200 Updated builds. commit 27f0400 Author: 林炳权 <[email protected]> Date: Sun Sep 24 01:32:21 2023 +0800 RenderTarget: Clean up. (mrdoob#26775) * RenderTarget: Clean up. * use `Object.assign()` * remove duplicate code commit 72d0d3c Author: Joe Pea <[email protected]> Date: Sat Sep 23 10:29:01 2023 -0700 Update Libraries-and-Plugins.html (mrdoob#26819) * Update Libraries-and-Plugins.html Add Lume, add a few descriptions, and separate open source wrappers/frameworks from closed source wrappers/frameworks. * Update Libraries-and-Plugins.html * Update Libraries-and-Plugins.html commit 9d2d7eb Author: sunag <[email protected]> Date: Sat Sep 23 01:16:29 2023 -0300 TSL: Introduce ShaderCallNode & `tslFn` improvements (mrdoob#26824) * Add ShaderCallNode * cleanup * Use tslFn as default commit 45505ed Author: sunag <[email protected]> Date: Fri Sep 22 16:58:55 2023 -0300 TSL: SetNode (mrdoob#26785) * Add SetNode * Use viewProj.setZ() * cleanup commit aa7bec9 Author: aardgoose <[email protected]> Date: Fri Sep 22 20:47:46 2023 +0100 Nodes: consume labels() when used, to prevent duplicate uniform names. (mrdoob#26822) Co-authored-by: aardgoose <[email protected]> commit 5bab962 Author: aardgoose <[email protected]> Date: Fri Sep 22 17:38:55 2023 +0100 WebGPURenderer: Support textureCompare() operations in WebGL backend (mrdoob#26823) Co-authored-by: aardgoose <[email protected]> commit ac901f1 Author: Mugen87 <[email protected]> Date: Fri Sep 22 12:31:27 2023 +0200 Updated builds. commit 2ac424c Author: aardgoose <[email protected]> Date: Fri Sep 22 05:40:45 2023 +0100 WebGPURenderer: Support multiple render targets (mrdoob#26808) * less var access (mrdoob#26817) actually use the framebuffer we have cached update examples update screenshots MRT allow example to run fix WGSL code address comments update screenshot * remove unused var * cleanup --------- Co-authored-by: ycw <[email protected]> Co-authored-by: aardgoose <[email protected]> Co-authored-by: sunag <[email protected]> commit 309e5f6 Author: ycw <[email protected]> Date: Thu Sep 21 20:35:27 2023 +0800 less var access (mrdoob#26817) commit c1bf227 Author: ycw <[email protected]> Date: Thu Sep 21 16:14:29 2023 +0800 AnimationUtils: Remove `arraySlice()`. (mrdoob#26756) * use default * exclusive * rm arraySlice * rm test, rm docs commit ef417f0 Author: aardgoose <[email protected]> Date: Wed Sep 20 17:33:28 2023 +0100 WebGPURenderer: Basic render to texture support for WebGL backend (mrdoob#26801) * Support texture backed render targets * actually use the framebuffer we have cached * update examples * update screenshots --------- Co-authored-by: aardgoose <[email protected]> commit bc69abb Author: Mugen87 <[email protected]> Date: Wed Sep 20 15:56:06 2023 +0200 Updated builds. commit 7bf83b8 Author: Michael Herzog <[email protected]> Date: Wed Sep 20 15:55:19 2023 +0200 Shaders: Remove struct GeometricContext to improve Adreno GPU support. (mrdoob#26805) commit 32cf0d1 Author: ycw <[email protected]> Date: Wed Sep 20 17:22:22 2023 +0800 cleanup (mrdoob#26803) commit 85f9f28 Author: sunag <[email protected]> Date: Tue Sep 19 18:25:56 2023 -0300 WebGPURenderer: CCW FrontFace as default (mrdoob#26807) commit cf340b9 Author: sunag <[email protected]> Date: Tue Sep 19 18:25:25 2023 -0300 TSL: Fix `.negate()` (mrdoob#26804) * Fix dFdy().negate() * Fix .negate() commit 1e673db Author: sunag <[email protected]> Date: Mon Sep 18 16:39:52 2023 -0300 Updated screenshot of the `webgpu_lights_ies_spotlight` (mrdoob#26800) commit 75b9699 Author: Tim Weißenfels <[email protected]> Date: Mon Sep 18 20:01:06 2023 +0200 Update documentation of Object3D#userData (mrdoob#26799) * Update userData description in Object3D.html Updated the documentation to make clear what the default value is (otherwise one could assume it might be null or undefined). * Update Texture.html * Update Material.html * Update BufferGeometry.html commit 0b0a7d7 Author: StrandedKitty <[email protected]> Date: Mon Sep 18 19:45:10 2023 +0200 Use cameraPosition uniform instead of world origin (mrdoob#26766) commit 217e20e Author: Mugen87 <[email protected]> Date: Mon Sep 18 19:43:42 2023 +0200 Updated builds. commit 1454e7a Author: ycw <[email protected]> Date: Tue Sep 19 01:42:56 2023 +0800 ObjectLoader: Refector (de)serialization of Fog and FogExp2 (mrdoob#26793) * marshal fog/fogexp2 .name * use object literal commit 1a7b805 Author: ycw <[email protected]> Date: Tue Sep 19 01:41:38 2023 +0800 re order (mrdoob#26780) commit f4488d8 Author: Michael Herzog <[email protected]> Date: Mon Sep 18 19:41:00 2023 +0200 LightProbeGenerator: Add support for half float render targets. (mrdoob#26773) commit e74c655 Author: aardgoose <[email protected]> Date: Mon Sep 18 18:21:40 2023 +0100 WebGPURenderer: Texture fixes for WebGL backend (mrdoob#26797) * misc texture fixes handle VideoTexture. handle depth textures in GLSL shaders (depth in x component in returned vec4()) map WGSL textureDimensions to GLSL textureSize() Examples fixed lights / ies /spotlights video / panorama material / video (partial) * remove surplus entry --------- Co-authored-by: aardgoose <[email protected]> commit 18febaf Author: sunag <[email protected]> Date: Mon Sep 18 07:13:40 2023 -0300 WebGPURenderer, CubeCamera: Add `.activeMipmapLevel` (mrdoob#26770) * CubeCamera: Add .activeMipmapLevel * Use CubeCamera * WebGPURenderer: Add .activeMipmapLevel for set .setRenderTarget() commit 16eaae5 Author: ycw <[email protected]> Date: Mon Sep 18 16:27:01 2023 +0800 cleanup (mrdoob#26791) commit 633d804 Author: Michael Herzog <[email protected]> Date: Mon Sep 18 10:22:45 2023 +0200 Editor: Fix `CapsuleGeometry` parameter. (mrdoob#26794) commit fffeb0c Author: ycw <[email protected]> Date: Mon Sep 18 15:32:50 2023 +0800 fmt code block (mrdoob#26792) commit b6150e4 Author: WestLangley <[email protected]> Date: Mon Sep 18 01:56:38 2023 -0400 Simplify equation (mrdoob#26787) commit 93c3589 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Sun Sep 17 22:02:02 2023 +0000 Update devDependencies (non-major) (mrdoob#26783) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 4ed78c7 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Sun Sep 17 20:10:40 2023 +0200 Update github/codeql-action digest to 04daf01 (mrdoob#26782) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 2c8cfdf Author: sunag <[email protected]> Date: Sun Sep 17 00:10:52 2023 -0300 WebGPURenderer: StorageTexture (mrdoob#26769) * Add StorageTexture * add `webgpu_compute_texture_pingpong` example commit 80ba01c Author: aardgoose <[email protected]> Date: Sun Sep 17 03:19:42 2023 +0100 negate dpdy only (mrdoob#26776) Co-authored-by: aardgoose <[email protected]> commit 99d705f Author: 林炳权 <[email protected]> Date: Sun Sep 17 00:52:53 2023 +0800 Sprite: Clean up. (mrdoob#26774) commit c6cfa6a Author: Michael Herzog <[email protected]> Date: Sat Sep 16 10:46:13 2023 +0200 CubeCamera: Add comment to clarify mipmap generation. (mrdoob#26772) commit 51462bf Author: Mugen87 <[email protected]> Date: Sat Sep 16 09:59:49 2023 +0200 Updated builds. commit b17a561 Author: Michael Herzog <[email protected]> Date: Sat Sep 16 09:58:24 2023 +0200 WebGLTextures: Increase default precision for depth buffers with WebGL 2. (mrdoob#26764) * WebGLTextures: Increase default precision for depth buffers with WebGL 2. * Examples: Update screenshots. * Examples: Update screenshots. * Add webgl2_multisampled_renderbuffers to exception list. commit 8193d58 Author: Mugen87 <[email protected]> Date: Sat Sep 16 09:54:34 2023 +0200 Updated builds. commit 5238fae Author: Michael Herzog <[email protected]> Date: Sat Sep 16 09:53:35 2023 +0200 WebGLRenderer: Introduce USE_LIGHT_PROBES define. (mrdoob#26768) * WebGLRenderer: Introduce USE_LIGHT_PROBES define. * Examples: Make use of USE_LIGHT_PROBES. * Add light probe define to vertex shader --------- Co-authored-by: WestLangley <[email protected]> commit fbc28ae Author: 林炳权 <[email protected]> Date: Fri Sep 15 16:22:16 2023 +0800 src: Clean up. (mrdoob#26763) commit 18ae441 Author: Casey Primozic <[email protected]> Date: Fri Sep 15 00:55:35 2023 -0700 Docs: Add some missing options to `MeshPhysicalMaterial` demo. (mrdoob#26753) * Add some missing options to `MeshPhysicalMaterial` demo * Add GUI options for some missing properties including sheen, ior, iridescence, and others to the material browser embedded on the docs pages for materials * Use real default `sheenColor in material browser * Re-disable dirlights in `MeshPhysicalMaterial` material browser * Update docs to correct the default `sheenColor` * Docs stated it was 0xfffff, but it's actually 0x000000 * Fixes mrdoob#26757 * Add back deleted comment commit 30164c9 Author: ycw <[email protected]> Date: Fri Sep 15 09:58:20 2023 +0800 Camera: Simplify `getWorldDirection()`. (mrdoob#26743) * refactor getWorldDirection * revert object3d
The example turned out very well. Not because it happens to be what I need, but because it conveys the node system very well in conjunction with slightly more extensive but not too large WGSL shaders. It also teaches pretty much everything one need to use compute shaders with their full potential for texture generation. In my opinion, the 3 compute examples and the materials example are sufficient to learn nearly everything about the node system. I'm now really looking forward to the weekend to port my IFFT generator with r157 into my WebGPU variant. |
* handle instanced geometries handle interleaved buffers and deduplicate add clear() for frame buffer * remove redundant code * adjust support message * support InstancedMesh and updateAttribute() * remove version inc * Squashed commit of the following: commit 181e04e Author: Mr.doob <[email protected]> Date: Fri Sep 29 00:10:20 2023 +0900 r157 commit cabaf21 Author: Mr.doob <[email protected]> Date: Fri Sep 29 00:08:47 2023 +0900 Updated builds. commit 1c85c95 Author: Mr.doob <[email protected]> Date: Thu Sep 28 23:41:31 2023 +0900 Improved USDZLoader example. commit d6c8dd0 Author: Mr.doob <[email protected]> Date: Thu Sep 28 22:53:05 2023 +0900 Improved compute texture examples. commit f886330 Author: GitHubDragonFly <[email protected]> Date: Thu Sep 28 03:23:34 2023 -0400 USDZ Loader - texture scale + offset + rotation (#26861) commit cb64471 Author: Levi Pesin <[email protected]> Date: Thu Sep 28 04:55:58 2023 +0930 Nodes: Fix `addLightNode` in case of anonymizing classes (#26858) * Fix `addLightNode` in case of anonymizing classes * Address comment * Update AmbientLightNode.js * Update DirectionalLightNode.js * Update HemisphereLightNode.js * Update IESSpotLightNode.js * Update PointLightNode.js * Update SpotLightNode.js * Fix commit 688b749 Author: sunag <[email protected]> Date: Wed Sep 27 13:42:29 2023 -0300 WebGLNodeBuilder: Fix Multi-Material (#26841) commit bf7a89e Author: mrdoob <[email protected]> Date: Wed Sep 27 20:33:38 2023 +0900 Fixed DeepScan issue. commit 285c9b6 Author: YX <[email protected]> Date: Wed Sep 27 16:32:50 2023 +0800 Update SpriteMaterial.html (#26855) Fixed incorrect Chinese translation. commit 5c00457 Author: 郭斌勇 <[email protected]> Date: Wed Sep 27 16:26:37 2023 +0800 CurvePath: Use correct line type in `closePath()`. (#26850) * fix #26849 * Update CurvePath.js --------- Co-authored-by: Michael Herzog <[email protected]> commit 083be57 Author: Shuhei Aoyama <[email protected]> Date: Wed Sep 27 15:53:03 2023 +0900 GLTFLoader: Fix to handle reject on afterRoot (#26852) commit 2d1695e Author: Levi Pesin <[email protected]> Date: Wed Sep 27 04:57:29 2023 +0930 Nodes: Fix `addNodeClass` and `addNodeMaterial` in case of renaming classes (#26846) commit 6a5d6de Author: sunag <[email protected]> Date: Tue Sep 26 16:13:03 2023 -0300 StorageTexture: Adds support for other formats. (#26842) * TimeNode: Define `frameId` as integer * Renderer: Set `info` as public * StorageTexture: Adds support for other formats. * Update example to `temporal blur` * fix device in getFormat() commit 9fe5ed2 Author: sunag <[email protected]> Date: Tue Sep 26 16:10:10 2023 -0300 TSL: Fix include one function under another. (#26844) * TSL: Fix include one function under another. * Add include example commit ca5c7cb Author: sunag <[email protected]> Date: Tue Sep 26 16:09:42 2023 -0300 Examples: Rename some WebGPU Compute examples (#26845) * webgpu_compute -> webgpu_compute_points * webgpu_audio_processing -> webgpu_compute_audio commit 379038f Author: sunag <[email protected]> Date: Tue Sep 26 01:27:04 2023 -0300 WebGPURenderer: Fix .flipY example commit 2ccc5bc Author: sunag <[email protected]> Date: Mon Sep 25 23:54:10 2023 -0300 Nodes: Rename `construct()` to `setup()` (#26840) * Nodes: Rename `construct()` to `setup()` * deprecated alert commit e2f5911 Author: sunag <[email protected]> Date: Mon Sep 25 23:45:33 2023 -0300 WebGPURenderer: GPU FlipY (#26818) * GPU FlipY * use tempTexture.destroy() * fix name * Rename to `WebGPUTexturePassUtils` and `_getPassUtils()` commit 0f65abb Author: sunag <[email protected]> Date: Mon Sep 25 22:51:02 2023 -0300 TextureNode: Rename `.getTextureMatrix()` -> `.getTransformedUV()` (#26839) commit 8d241a6 Author: Marco Fugaro <[email protected]> Date: Tue Sep 26 02:51:33 2023 +0200 Examples: Remove import maps polyfill (#26836) commit 1a67ba7 Author: sunag <[email protected]> Date: Mon Sep 25 18:25:00 2023 -0300 RenderNodes: Fix `context.material` reference. (#26838) commit 15e4656 Author: Sachin S <[email protected]> Date: Mon Sep 25 04:39:03 2023 -0400 DragControls: Add `recursive` property. (#26747) * add recursive property to DragControls * Update DragControls.js Clean up. --------- Co-authored-by: Michael Herzog <[email protected]> commit 43d68fc Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Sep 25 10:38:50 2023 +0200 Update github/codeql-action digest to 6a28655 (#26833) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 10e8823 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Sep 25 10:38:42 2023 +0200 Update actions/checkout digest to 8ade135 (#26832) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit e857553 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Mon Sep 25 00:14:05 2023 +0000 Update devDependencies (non-major) (#26834) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 53c642e Author: Michael Herzog <[email protected]> Date: Sun Sep 24 11:28:27 2023 +0200 Docs: Clean up. (#26831) commit 53ee377 Author: Guilherme Avila <[email protected]> Date: Sun Sep 24 06:22:08 2023 -0300 EXRExporter: implements support for DataTexture export (#26810) * EXRExporter: DataTexture support Signed-off-by: Guilherme Avila <[email protected]> * EXRExporter: update API & docs Signed-off-by: Guilherme Avila <[email protected]> * Examples: add misc_exporter_exr Signed-off-by: Guilherme Avila <[email protected]> * fix MIME-type Signed-off-by: Guilherme Avila <[email protected]> * update DataTexture usage example Signed-off-by: Guilherme Avila <[email protected]> * update screenshot Signed-off-by: Guilherme Avila <[email protected]> --------- Signed-off-by: Guilherme Avila <[email protected]> commit c3a746a Author: Isaac Mason <[email protected]> Date: Sun Sep 24 18:30:05 2023 +1000 docs: add recast-navigation-js to libraries and plugins page (#26828) commit 89e698f Author: Mugen87 <[email protected]> Date: Sat Sep 23 19:39:04 2023 +0200 Updated builds. commit 27f0400 Author: 林炳权 <[email protected]> Date: Sun Sep 24 01:32:21 2023 +0800 RenderTarget: Clean up. (#26775) * RenderTarget: Clean up. * use `Object.assign()` * remove duplicate code commit 72d0d3c Author: Joe Pea <[email protected]> Date: Sat Sep 23 10:29:01 2023 -0700 Update Libraries-and-Plugins.html (#26819) * Update Libraries-and-Plugins.html Add Lume, add a few descriptions, and separate open source wrappers/frameworks from closed source wrappers/frameworks. * Update Libraries-and-Plugins.html * Update Libraries-and-Plugins.html commit 9d2d7eb Author: sunag <[email protected]> Date: Sat Sep 23 01:16:29 2023 -0300 TSL: Introduce ShaderCallNode & `tslFn` improvements (#26824) * Add ShaderCallNode * cleanup * Use tslFn as default commit 45505ed Author: sunag <[email protected]> Date: Fri Sep 22 16:58:55 2023 -0300 TSL: SetNode (#26785) * Add SetNode * Use viewProj.setZ() * cleanup commit aa7bec9 Author: aardgoose <[email protected]> Date: Fri Sep 22 20:47:46 2023 +0100 Nodes: consume labels() when used, to prevent duplicate uniform names. (#26822) Co-authored-by: aardgoose <[email protected]> commit 5bab962 Author: aardgoose <[email protected]> Date: Fri Sep 22 17:38:55 2023 +0100 WebGPURenderer: Support textureCompare() operations in WebGL backend (#26823) Co-authored-by: aardgoose <[email protected]> commit ac901f1 Author: Mugen87 <[email protected]> Date: Fri Sep 22 12:31:27 2023 +0200 Updated builds. commit 2ac424c Author: aardgoose <[email protected]> Date: Fri Sep 22 05:40:45 2023 +0100 WebGPURenderer: Support multiple render targets (#26808) * less var access (#26817) actually use the framebuffer we have cached update examples update screenshots MRT allow example to run fix WGSL code address comments update screenshot * remove unused var * cleanup --------- Co-authored-by: ycw <[email protected]> Co-authored-by: aardgoose <[email protected]> Co-authored-by: sunag <[email protected]> commit 309e5f6 Author: ycw <[email protected]> Date: Thu Sep 21 20:35:27 2023 +0800 less var access (#26817) commit c1bf227 Author: ycw <[email protected]> Date: Thu Sep 21 16:14:29 2023 +0800 AnimationUtils: Remove `arraySlice()`. (#26756) * use default * exclusive * rm arraySlice * rm test, rm docs commit ef417f0 Author: aardgoose <[email protected]> Date: Wed Sep 20 17:33:28 2023 +0100 WebGPURenderer: Basic render to texture support for WebGL backend (#26801) * Support texture backed render targets * actually use the framebuffer we have cached * update examples * update screenshots --------- Co-authored-by: aardgoose <[email protected]> commit bc69abb Author: Mugen87 <[email protected]> Date: Wed Sep 20 15:56:06 2023 +0200 Updated builds. commit 7bf83b8 Author: Michael Herzog <[email protected]> Date: Wed Sep 20 15:55:19 2023 +0200 Shaders: Remove struct GeometricContext to improve Adreno GPU support. (#26805) commit 32cf0d1 Author: ycw <[email protected]> Date: Wed Sep 20 17:22:22 2023 +0800 cleanup (#26803) commit 85f9f28 Author: sunag <[email protected]> Date: Tue Sep 19 18:25:56 2023 -0300 WebGPURenderer: CCW FrontFace as default (#26807) commit cf340b9 Author: sunag <[email protected]> Date: Tue Sep 19 18:25:25 2023 -0300 TSL: Fix `.negate()` (#26804) * Fix dFdy().negate() * Fix .negate() commit 1e673db Author: sunag <[email protected]> Date: Mon Sep 18 16:39:52 2023 -0300 Updated screenshot of the `webgpu_lights_ies_spotlight` (#26800) commit 75b9699 Author: Tim Weißenfels <[email protected]> Date: Mon Sep 18 20:01:06 2023 +0200 Update documentation of Object3D#userData (#26799) * Update userData description in Object3D.html Updated the documentation to make clear what the default value is (otherwise one could assume it might be null or undefined). * Update Texture.html * Update Material.html * Update BufferGeometry.html commit 0b0a7d7 Author: StrandedKitty <[email protected]> Date: Mon Sep 18 19:45:10 2023 +0200 Use cameraPosition uniform instead of world origin (#26766) commit 217e20e Author: Mugen87 <[email protected]> Date: Mon Sep 18 19:43:42 2023 +0200 Updated builds. commit 1454e7a Author: ycw <[email protected]> Date: Tue Sep 19 01:42:56 2023 +0800 ObjectLoader: Refector (de)serialization of Fog and FogExp2 (#26793) * marshal fog/fogexp2 .name * use object literal commit 1a7b805 Author: ycw <[email protected]> Date: Tue Sep 19 01:41:38 2023 +0800 re order (#26780) commit f4488d8 Author: Michael Herzog <[email protected]> Date: Mon Sep 18 19:41:00 2023 +0200 LightProbeGenerator: Add support for half float render targets. (#26773) commit e74c655 Author: aardgoose <[email protected]> Date: Mon Sep 18 18:21:40 2023 +0100 WebGPURenderer: Texture fixes for WebGL backend (#26797) * misc texture fixes handle VideoTexture. handle depth textures in GLSL shaders (depth in x component in returned vec4()) map WGSL textureDimensions to GLSL textureSize() Examples fixed lights / ies /spotlights video / panorama material / video (partial) * remove surplus entry --------- Co-authored-by: aardgoose <[email protected]> commit 18febaf Author: sunag <[email protected]> Date: Mon Sep 18 07:13:40 2023 -0300 WebGPURenderer, CubeCamera: Add `.activeMipmapLevel` (#26770) * CubeCamera: Add .activeMipmapLevel * Use CubeCamera * WebGPURenderer: Add .activeMipmapLevel for set .setRenderTarget() commit 16eaae5 Author: ycw <[email protected]> Date: Mon Sep 18 16:27:01 2023 +0800 cleanup (#26791) commit 633d804 Author: Michael Herzog <[email protected]> Date: Mon Sep 18 10:22:45 2023 +0200 Editor: Fix `CapsuleGeometry` parameter. (#26794) commit fffeb0c Author: ycw <[email protected]> Date: Mon Sep 18 15:32:50 2023 +0800 fmt code block (#26792) commit b6150e4 Author: WestLangley <[email protected]> Date: Mon Sep 18 01:56:38 2023 -0400 Simplify equation (#26787) commit 93c3589 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Sun Sep 17 22:02:02 2023 +0000 Update devDependencies (non-major) (#26783) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 4ed78c7 Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Date: Sun Sep 17 20:10:40 2023 +0200 Update github/codeql-action digest to 04daf01 (#26782) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> commit 2c8cfdf Author: sunag <[email protected]> Date: Sun Sep 17 00:10:52 2023 -0300 WebGPURenderer: StorageTexture (#26769) * Add StorageTexture * add `webgpu_compute_texture_pingpong` example commit 80ba01c Author: aardgoose <[email protected]> Date: Sun Sep 17 03:19:42 2023 +0100 negate dpdy only (#26776) Co-authored-by: aardgoose <[email protected]> commit 99d705f Author: 林炳权 <[email protected]> Date: Sun Sep 17 00:52:53 2023 +0800 Sprite: Clean up. (#26774) commit c6cfa6a Author: Michael Herzog <[email protected]> Date: Sat Sep 16 10:46:13 2023 +0200 CubeCamera: Add comment to clarify mipmap generation. (#26772) commit 51462bf Author: Mugen87 <[email protected]> Date: Sat Sep 16 09:59:49 2023 +0200 Updated builds. commit b17a561 Author: Michael Herzog <[email protected]> Date: Sat Sep 16 09:58:24 2023 +0200 WebGLTextures: Increase default precision for depth buffers with WebGL 2. (#26764) * WebGLTextures: Increase default precision for depth buffers with WebGL 2. * Examples: Update screenshots. * Examples: Update screenshots. * Add webgl2_multisampled_renderbuffers to exception list. commit 8193d58 Author: Mugen87 <[email protected]> Date: Sat Sep 16 09:54:34 2023 +0200 Updated builds. commit 5238fae Author: Michael Herzog <[email protected]> Date: Sat Sep 16 09:53:35 2023 +0200 WebGLRenderer: Introduce USE_LIGHT_PROBES define. (#26768) * WebGLRenderer: Introduce USE_LIGHT_PROBES define. * Examples: Make use of USE_LIGHT_PROBES. * Add light probe define to vertex shader --------- Co-authored-by: WestLangley <[email protected]> commit fbc28ae Author: 林炳权 <[email protected]> Date: Fri Sep 15 16:22:16 2023 +0800 src: Clean up. (#26763) commit 18ae441 Author: Casey Primozic <[email protected]> Date: Fri Sep 15 00:55:35 2023 -0700 Docs: Add some missing options to `MeshPhysicalMaterial` demo. (#26753) * Add some missing options to `MeshPhysicalMaterial` demo * Add GUI options for some missing properties including sheen, ior, iridescence, and others to the material browser embedded on the docs pages for materials * Use real default `sheenColor in material browser * Re-disable dirlights in `MeshPhysicalMaterial` material browser * Update docs to correct the default `sheenColor` * Docs stated it was 0xfffff, but it's actually 0x000000 * Fixes #26757 * Add back deleted comment commit 30164c9 Author: ycw <[email protected]> Date: Fri Sep 15 09:58:20 2023 +0800 Camera: Simplify `getWorldDirection()`. (#26743) * refactor getWorldDirection * revert object3d * update screenshot --------- Co-authored-by: aardgoose <[email protected]>
Is writing here still correct to the topic? I don't want to create new issues unnecessarily. The pingpong mechanism works fine. I like the solution with the two compute initializations so that only the respective compute needs to be rendered. I have an idea for an extension of StorageTexture. I'm currently initializing this via an initialization compute.
This is no effort but a method like ".setTexture(customTexture)" to initialize a storageTexture would be handy. A "setTexture()" method would be very practical for initializations in other classes to which textures are passed. But that's nothing urgent. I have another topic that is really causing me problems and that would probably be something for a new issue. If I pass the iteration steps to a uniform in a for loop, they don't arrive correctly in the shader. I created a post about this in the forum: https://discourse.threejs.org/t/has-anyone-noticed-any-unusual-behavior-in-the-uniform-node/56657 and made a CodePen example. https://codepen.io/Spiri0/pen/QWzZVdZ?editors=0010 I really like the node system. I think you've created something great with it. I don't claim to fully understand it, but the behavior I'm seeing in my uniform is strange. The analog mechanism in webgl2 works as I expect. |
I don't think we have implement the entire uniform mechanism for WebGPU compute, so it could be a uniform bug in specific to |
Seems like I can look forward to r158 then. There don't seem to be many people who are concerned with webgpu and the node system yet. But it's pretty elegant and saves code. It makes things easier. I tell myself that if interest in webgpu increases quickly, all of these points will already anticipate a lot. |
I think the concerned is because the system of nodes and |
I think that might have been the last obstacle in my implementation. The pingpong routine in which I need the uniform for the current iteration step is the last step in the IFFT calculation. The progress in r156 and r157 was already clearly noticeable for me. I think this covers most of the cases that users will ever have to deal with when generating textures with compute shaders. Not that I'm conjuring up the devil with my confidence, who will then confront me again with the next bug. But if that's the case, so be it. |
In the forum I see that other people are also interested in the node system and that makes me happy. Since there is still some time until r158, I thought I would take a look at what could possibly cause problems. Instead of THREE.HalfFloatType I tested THREE.FloatType and rgba32float in the shader. rgba16float is enough for me but I just wanted to see if rgba32float also works. That doesn't work and warnings appear in the console that remind me of #26576. But that's more of a luxury problem because with rgba16float I can do a lot of things and everything that I can currently imagine. |
Related issue: Closes #26749
Description
StorageTexture
webgpu_compute_texture_pingpong
example