Why TypeShade
TypeShade keeps shader logic in a typed source file and compiles it for supported GPU targets. It brings TypeScript authoring tools, shared shader source and output verification into the same workflow.
TypeScript tooling
Functions, classes, type annotations and imports provide a familiar way to organize shader code. A file starts with "use typeshade", which marks the boundary where shader types and execution rules apply. The editor extension adds completions, shader diagnostics and navigation. The TypeScript mapping explains how each supported construct compiles.
Shared shader source
WebGPU consumes WGSL, while WebGL2 consumes GLSL ES 3.00. Maintaining separate implementations means applying each change in each language. TypeShade lowers a shader program to a shared intermediate representation and emits the supported targets from it. A change to a helper function reaches each emitted version through the same compilation. The target guide explains where their capabilities differ.
Host integration
The compiler exposes shader source and reflection metadata for a host to inspect and consume. An application can use the output with its own renderer. The Vite plugin also lets a host import shader modules and call their entries through typeshade/runtime. The WebGPU and WebGL2 guide describes these integration paths and the resources the host provides.
A reference for verification
The CPU oracle evaluates the same intermediate representation in double precision. It supplies a reference for checking GPU results. Compiler checks also include target compilation, output snapshots and differential tests. Floating-point results can differ between execution targets. Verification describes the checks and their scope.
GPU constraints
A shader must follow resource, stage and target rules. Some constructs emit WGSL alone, and WebGL2 compute uses supported lowering paths with capability limits. TypeShade adds a compiler step and its own language rules. The language guide and target guide describe those constraints. Existing WGSL or GLSL may already cover a project that needs a single target or specific target features.
Project status
TypeShade is pre-release. Check the features and targets your application needs against the pinned compiler before adopting it. The quick start documents the current setup, and the design rules describe the language contract.
Next steps
Open the Playground to edit a shader and inspect its output. Follow the quick start to use it in a project, or browse the examples for complete programs.