[PR #8] feat(🫐): Use TypeGPU to strengthen the I/O layer between the CPU and GPU (TGSL Version) #217

Open
opened 2026-03-02 23:45:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/8
Author: @iwoplaza
Created: 8/4/2025
Status: 🔄 Open

Base: mainHead: feat/typegpu-supersampling-tgsl


📝 Commits (10+)

  • a98a8ff Use TypeGPU schemas to strengthen the IO layer between the super-sampling shader and pipeline setup
  • cc77469 Split the shader into TypeGPU functions
  • c955d23 Use TypeGPU pipelines
  • b705866 Update to typegpu 0.7.0
  • 3e89fab Rewrite supersampling functions in TypeScript
  • 8b248f4 Merge branch 'main' into feat/typegpu-supersampling-tgsl
  • 1645d0e Merge branch 'main' into feat/typegpu-supersampling-tgsl
  • d4e8941 Update bun.lock
  • fcca43f Update bun.lock
  • 2be3271 Update bun.lock

📊 Changes

7 files changed (+312 additions, -278 deletions)

View changed files

📝 bun.lock (+48 -0)
packages/core/bunfig.toml (+1 -0)
📝 packages/core/package.json (+3 -1)
packages/core/preload.ts (+4 -0)
📝 packages/core/src/3d/canvas.ts (+28 -76)
packages/core/src/3d/shaders/supersampling.ts (+228 -0)
packages/core/src/3d/shaders/supersampling.wgsl (+0 -201)

📄 Description

This is an updated version of the original PR, but instead of functions being implemented in WGSL, they're implemented in TypeScript. This allows type-safety to flow from host code directly to shader code.

The inclusion of unplugin-typegpu allows the implementations of tgpu.fn functions to be compiled to WGSL at bundle time


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/8 **Author:** [@iwoplaza](https://github.com/iwoplaza) **Created:** 8/4/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/typegpu-supersampling-tgsl` --- ### 📝 Commits (10+) - [`a98a8ff`](https://github.com/anomalyco/opentui/commit/a98a8ffb6fde11477a7f87a71118a8879898ba9c) Use TypeGPU schemas to strengthen the IO layer between the super-sampling shader and pipeline setup - [`cc77469`](https://github.com/anomalyco/opentui/commit/cc7746924074827b7c05fe8da60f33294fc5feca) Split the shader into TypeGPU functions - [`c955d23`](https://github.com/anomalyco/opentui/commit/c955d23662bb6f2a5a8cda2da62b995c8144d6c2) Use TypeGPU pipelines - [`b705866`](https://github.com/anomalyco/opentui/commit/b705866cf570801ce17dc1075aaf153458b60b58) Update to typegpu 0.7.0 - [`3e89fab`](https://github.com/anomalyco/opentui/commit/3e89fab9a1540b2e81f20e23ae0b44181d5260e2) Rewrite supersampling functions in TypeScript - [`8b248f4`](https://github.com/anomalyco/opentui/commit/8b248f42165aef0c2630f5d556d4f042e782972f) Merge branch 'main' into feat/typegpu-supersampling-tgsl - [`1645d0e`](https://github.com/anomalyco/opentui/commit/1645d0eea97deb16f57802b0bcbd0c39b71fe0d2) Merge branch 'main' into feat/typegpu-supersampling-tgsl - [`d4e8941`](https://github.com/anomalyco/opentui/commit/d4e8941085006273f8afedbee2d724e4326e1a2f) Update bun.lock - [`fcca43f`](https://github.com/anomalyco/opentui/commit/fcca43fe130586f338a75bfcfe53695becdd8aee) Update bun.lock - [`2be3271`](https://github.com/anomalyco/opentui/commit/2be327162ffec27e9e4b849b5102f96937b8e1c8) Update bun.lock ### 📊 Changes **7 files changed** (+312 additions, -278 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+48 -0) ➕ `packages/core/bunfig.toml` (+1 -0) 📝 `packages/core/package.json` (+3 -1) ➕ `packages/core/preload.ts` (+4 -0) 📝 `packages/core/src/3d/canvas.ts` (+28 -76) ➕ `packages/core/src/3d/shaders/supersampling.ts` (+228 -0) ➖ `packages/core/src/3d/shaders/supersampling.wgsl` (+0 -201) </details> ### 📄 Description This is an updated version of the [original PR](https://github.com/sst/opentui/pull/6), but instead of functions being implemented in WGSL, they're implemented in TypeScript. This allows type-safety to flow from host code directly to shader code. The inclusion of `unplugin-typegpu` allows the implementations of `tgpu.fn` functions to be compiled to WGSL at bundle time --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#217
No description provided.