{"id":13523830,"url":"https://conorpo.github.io/marching-cubes-webgpu/","last_synced_at":"2025-04-01T01:33:34.994Z","repository":{"id":203636342,"uuid":"710066046","full_name":"conorpo/marching-cubes-webgpu","owner":"conorpo","description":"CAP4720 Final Project (By Conor O'Malley \u0026 Nick Stuhldreher)","archived":false,"fork":false,"pushed_at":"2024-02-08T04:59:56.000Z","size":148,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-02T08:31:13.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://conorpo.github.io/marching-cubes-webgpu/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conorpo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-26T00:26:49.000Z","updated_at":"2023-12-17T07:01:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8f724b5-4b39-40ff-8180-d612c4ae76c5","html_url":"https://github.com/conorpo/marching-cubes-webgpu","commit_stats":null,"previous_names":["conorpo/marching-cubes-webgpu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorpo%2Fmarching-cubes-webgpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorpo%2Fmarching-cubes-webgpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorpo%2Fmarching-cubes-webgpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorpo%2Fmarching-cubes-webgpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conorpo","download_url":"https://codeload.github.com/conorpo/marching-cubes-webgpu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246567331,"owners_count":20798153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:04.129Z","updated_at":"2025-04-01T01:33:29.975Z","avatar_url":"https://github.com/conorpo.png","language":"JavaScript","funding_links":[],"categories":["Demos"],"sub_categories":["Safari"],"readme":"# Marching Cubes\n\n## Authors\n- Conor O'Malley\n- [Nick Stuhldreher](https://www.nickst.dev/)\n\n\n## Pipelines \u0026 Needed Resources\n\n0. Noise Field Creation\n    - Creates a 3D noise texture\n\n    - (Input) Permutation Table Buffer\n    - (Input) Noise Settings Buffer\n    - (Output) texture3d\\\u003cfloat\u003e Noise\n\n1. Marching Cubes (Triangle Creation)\n    - Runs the marching cubes algorithm on the noise texture\n\n    - (Input) texture3d\\\u003cfloat\u003e Noise\n    - (Input) Settings Buffer\n    - (Input) Triangulation LUT Buffer\n    - (Input / Output) Storage Buffer for Indices\n    - (Input / Output) Storage Buffer for Indirect Args\n    - (Input / Output) Storage Buffer for Vertices\n\n2. Rasterization and Rendering\n    - Renders out the triangles with a basic shader\n\n    - (Vertex Input) Vertex Buffer (position, normal)\n    - (Index Input) Index Buffer\n    - (Input) Render Settings\n\n12. Debug Noise (optional, replaces 2)\n    - Renders 2D slices of the noise texture to the screen\n    - (Input) texture3d\\\u003cfloat\u003e Noise\n    - (Input) Settings Uniform Buffer\n\n\n\n## TODO\n```\n- support window and resolution resizing during runtime (done)\n- translate the noise and the mesh based on position, so that we have an endless space, shouldnt affect performance at all (done)\n- add some procedural / interesting coloring / texturing (done)\n- add this one fps counter library that is really clean looking (done)\n- add additional sim settings (done)\n- store vertex buffers as seperate, so that they can be packed tightly (done)\n- add debug timing info (done)\n- setup auto build (done)\n```\n\n## Final Notes\nEnded up a bit more spaghetti'd than I'd like, but happy with the current state of it. Could gain some efficiency via frustrum culling or maybe rendering the noise offset by where the player is looking. The JavaScript object oriented style got a bit messy in the end, but it was a fun project to work on.\n\n## BindGroups Overview\n|                | BindGroup 0                          | BindGroup 1                                                                 | BindGroup 2  | BindGroup 3 |\n|----------------|--------------------------------------|-----------------------------------------------------------------------------|--------------|-------------|\n| Compute Noise  | PTable + Triangulation LUTs | Noise Texture + Noise Settings                                               |              |             |\n| Marching Cubes | PTable + Triangulation LUTs | Noise Texture, Marching Cube Settings, IndirectArgs; Vertex, Normal, Index Buffers |              |             |\n| Rendering      | Render Settings  |                                                                             |              |             |\n| Debug Noise    | Noise Texture + Settings  |  Settings                                                              |              |             |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/conorpo.github.io%2Fmarching-cubes-webgpu%2F","html_url":"https://awesome.ecosyste.ms/projects/conorpo.github.io%2Fmarching-cubes-webgpu%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/conorpo.github.io%2Fmarching-cubes-webgpu%2F/lists"}