Easily encode and decode
Leveraging typed-binary ensures you don't have to think about bytes when writing your GPU programs ever again.
Discover how it can change the way you work with GPU rendering and computing.
Leveraging typed-binary ensures you don't have to think about bytes when writing your GPU programs ever again.
Complex data types like structs and arrays can be easily described, and TypeScript automatically validates outgoing and incoming data.
Works on React Native thanks to the recently announced react-native-wgpu library.
The road to end-to-end type safety on the GPU involves implementing several interoperating primitives. Below is our roadmap of features that aim to fulfill that goal.
The WebGPU Shading Language (WGSL) gives developers a rich sense of the structure of the data that it operates on. This is lost when accessed through JavaScript, as the APIs accept raw byte buffers. TypeGPU regains that information on the JavaScript side and handles proper byte alignment and padding automatically.
Connecting resources to shaders via numeric indices can lead to problems that are hard to catch at build-time/CI. By using named keys and typed data structures we can ensure that the provided resources are what the shader expects.
By wrapping each function with a "typed shell", they can be moved across different files/modules. Any resources (variables, buffers, etc.) in the external scope can be accessed inside the function.
To ensure that shader stages match each other, and pipeline constants are filled with proper values, TypeGPU plans to provide typed pipelines.
By giving developers the ability to write imperative shader code in TypeScript, we can leverage the excellent TypeScript LSP to complete the type safety puzzle, bridging the gap between our API and type-safe shader code.
Take active part in the development by joining our discussions.
Try TypeGPU and reshape your GPU rendering and computing.