Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>G for GWebGPUNew to Visual Studio Code? Get it now.
G for GWebGPU

G for GWebGPU

xiaoiver

|
401 installs
| (0) | Free
A language using in compute shader for GWebGPU based on TypeScript
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

g-for-gwebgpu README

It's hard for frontend engineers to write compute shaders in GPGPU scenarios. So we create a TypeScript-liked language in our GWebGPU project.

For more information, refer to our docs: https://gwebgpu.antv.vision/zh/docs/api/syntax.

It's an example to add 2 vectors writing with our syntax.

@numthreads(8, 1, 1)
class Add2Vectors {
  @in @out
  vectorA: float[];

  @in
  vectorB: float[];

  sum(a: float, b: float): float {
    return a + b;
  }

  @main
  compute() {
    const a = this.vectorA[globalInvocationID.x];
    const b = this.vectorB[globalInvocationID.x];
    this.vectorA[globalInvocationID.x] = this.sum(a, b);
  }
}

Features

  • syntax highlight with TextMate grammars

0.0.1

  • syntax highlight with TextMate grammars
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft