mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #6] feat(🫐): Use TypeGPU to strengthen the I/O layer between the CPU and GPU #994
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#994
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/6
Author: @iwoplaza
Created: 7/30/2025
Status: 🔄 Open
Base:
main← Head:feat/typegpu-supersampling📝 Commits (8)
a98a8ffUse TypeGPU schemas to strengthen the IO layer between the super-sampling shader and pipeline setupcc77469Split the shader into TypeGPU functionsc955d23Use TypeGPU pipelinesb705866Update to typegpu 0.7.00b4b421Merge branch 'main' into feat/typegpu-supersampling8a5aeabMerge branch 'main' into feat/typegpu-supersampling7b0a243Remove unused supersampling.wgsl7a1b3fbFix package.json after merge📊 Changes
5 files changed (+267 additions, -278 deletions)
View changed files
📝
bun.lock(+19 -0)📝
packages/core/package.json(+2 -1)📝
packages/core/src/3d/canvas.ts(+28 -76)➕
packages/core/src/3d/shaders/supersampling.ts(+218 -0)➖
packages/core/src/3d/shaders/supersampling.wgsl(+0 -201)📄 Description
Hey guys! 👋
Awesome initiative, TUIs are really having a comeback. And when I saw @kommander's involvement, and WebGPU running in the terminal, I had to snoop around the code.
I maintain a TypeScript library that promises better synergy between TypeScript and WebGPU, without getting in the developer's way, called TypeGPU. More TypeScript'y stuff can be sprinkled in where it makes sense, but the rest can be kept vanilla WebGPU. It's still in active development, and I love taking opportunities to see if it can help in projects that already use WebGPU at it's current state. This will help me remove any
['~unstable']tags from TypeGPU APIs and ensure that what it's providing is actually useful to the community!If you guys like this direction, we could go further by actually implementing the shader functions in TypeScript, instead of WGSL strings. It's something that my team and I been working on for a couple of months now, where we can compile TypeScript to WGSL at build time*. We can choose the implementation language at the function level, so a shader can be composed of TS and WGSL, no lock in ⛓️💥
At build-time: JavaScript -> tinyest (Tiny Embeddable Syntax Tree™) --(crossing over to runtime)--> WGSL
We do this to support more dynamic shader linking, while still not having to ship a JS parser to the browser/terminal like we would have to otherwise 🤢
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.