Skip to content

feat: Add triangular patches to @typegpu/geometry - #3014

Draft
reczkok wants to merge 1 commit into
feat/geometry-meshesfrom
feat/geometry-patches
Draft

reczkok wants to merge 1 commit into
feat/geometry-meshesfrom
feat/geometry-patches

Conversation

@reczkok

@reczkok reczkok commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adds triangular patch surfaces to meshes, with subdivision separate from surface sampling

  • icosphere, capsule and rounded box primitives
  • tessellate into indexed geometry or sample patches directly in vertex shaders
  • shared index buffer across subdivision levels, so detail can change without rebuilding buffers
  • spherical interpolation helpers + an interactive patch tessellation example

Tessellation and spherical interpolation ideas yoinked from @deluksic’s de/geometry-spheres branch, shared in the original PR comment

Stacks on #2997

Adapt triangle tessellation and spherical interpolation from https://github.com/deluksic/TypeGPU/tree/647e8f5dc8e5a708420ac83fbf51503e37828049

Co-authored-by: David Emanuel Luksic <deluksic@gmail.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/typegpu@02709ec5acd71c833282fad3095de0ea153c4009
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@02709ec5acd71c833282fad3095de0ea153c4009
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@02709ec5acd71c833282fad3095de0ea153c4009

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased ❔ Unknown
0 325 0 0

No notable changes.

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Resolution Time Benchmark

---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [1.02, 2.01, 4.71, 7.20, 7.79, 13.05, 24.91, 26.64]
  line [0.97, 2.03, 4.21, 7.24, 7.70, 11.59, 25.01, 26.04]
  line [1.04, 2.08, 4.31, 6.78, 7.87, 13.09, 25.68, 27.65]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.31, 0.59, 0.72, 0.85, 1.13, 1.25, 1.49, 1.58]
  line [0.30, 0.50, 0.69, 0.84, 1.28, 1.21, 1.41, 1.57]
  line [0.30, 0.54, 0.71, 0.87, 1.23, 1.25, 1.51, 1.77]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.97, 2.26, 3.95, 7.37, 12.71, 27.22, 57.25, 114.62]
  line [0.95, 2.26, 4.07, 7.69, 13.72, 27.46, 58.55, 120.43]
  line [0.89, 2.07, 3.51, 7.83, 13.14, 26.38, 59.27, 119.08]
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant