Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions apps/typegpu-docs/src/content/docs/why-typegpu/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@
title: Why TypeGPU?
---

TypeGPU is a project that aims to provide a type-safe abstraction over WebGPU, one that makes invalid states hard to represent but does not
restrict the developer's intent where it counts.
**TypeGPU** is a modular and open-ended toolkit for [WebGPU](https://gpuweb.github.io/gpuweb/explainer/), with advanced type inference and the ability to write shaders in TypeScript.
The goal is to bring the flexibility and strengths of TypeScript into WGSL and WebGPU.

It is by no means a compromise in performance or expressivity in exchange for improved
developer experience, in many ways [it makes writing performant code more natural](https://bruh.com) than with vanilla WebGPU and WGSL. The abstraction aims to strike a balance, making invalid states hard to represent without
restricting the developer's intent where it counts.

The primitives exported by TypeGPU can be used to enhance an existing project where it matters most, integrated into a third-party framework as a robust shader system, or used standalone to create type-safe apps and libraries.
- The [WebGPU Interoperability](/TypeGPU/integration/webgpu-interoperability/) guide shares more on interweaving TypeGPU and WebGPU.
- Read the official [@typegpu/three](/TypeGPU/ecosystem/typegpu-three) guide for Three.js interop.
- [Fundamentals](/TypeGPU/fundamentals/your-first-gpu-program/) are a great place to start learning graphics & GPGPU programming with TypeGPU

## Why did we create TypeGPU?

## Our philosophy

Expand All @@ -22,6 +33,12 @@ import { Image } from 'astro:assets';
<Image className="block! dark:hidden!" src={ModularityLight} alt="Modularity" />
</div>

## Keeping data on the GPU

## Effortless generic shaders



## Leaving WebGL behind

Even though WebGPU is a fairly new standard and is yet to be supported by all platforms, we are betting on it becoming the future of GPU computing on the web. Because of this, we can
Expand Down Expand Up @@ -64,15 +81,22 @@ They then get destroyed when calling `runtime.dispose()`.

</details> */}

{/* <details>
<details>
<summary>🙋 Do I have to use TypeScript?</summary>

No.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you really should


</details>

<details>
<summary>🙋 How does TypeGPU differ from Three.js or Babylon.js?</summary>

TypeGPU is a set of primitives for building WebGPU solutions, as opposed to a framework created for a
specific use case like Three.js or Babylon.js. Our hope is that libraries built on top of TypeGPU can interact with
each other with the common language of our primitives, even though they are built with different use
cases in mind (Visualization, AI inference, etc.).

</details> */}
</details>

<details>
<summary>🙋 Which browsers/platforms support TypeGPU?</summary>
Expand Down
Loading