# TypeShade > TypeShade is a TypeScript library for writing shaders. You author one typed module, and one intermediate representation emits WGSL for WebGPU and GLSL ES 3.00 for WebGL2. The same module also compiles to a CPU function that runs in double precision, and the test suite checks the compiler's algebra against it. A misspelt uniform field is a TypeScript error at author time; reflect() recovers std140 and std430 layouts, so a host packs its uniform buffer from the compiler's own layout; emulated double precision is authored with the same syntax as f32. It has 0 runtime dependencies and is MIT licensed. Its own CI compiles every WGSL emit on Tint and links every renderable example on WebGL2, on every push. Version 0.1.0 is not published yet and the npm name typeshade is reserved, so start from the mirror and the authoring guide. ## Links - Why TypeShade (why one source for two shader languages): https://typeshade.dev/guide/introduction/ - Verification (what CI runs on every push): https://typeshade.dev/guide/checks/ - Examples (the 36 examples, the GLSL emit and the emulated-double demo): https://typeshade.dev/guide/examples/ - Authoring guide (the authoring guide): https://typeshade.dev/guide/authoring/ - GitHub (mirror; pull requests cannot be merged there yet; consume as a git submodule, its root is the package): https://github.com/typeshade/typeshade - README (the repository's README): https://github.com/typeshade/typeshade/blob/d894fc0/README.md - typeshade: https://www.npmjs.com/package/typeshade - d894fc0 (the commit every number below was measured at): https://github.com/typeshade/typeshade/tree/d894fc0 ## Measured at build time from the compiler pinned at d894fc0 - 35 of the 36 examples emit WGSL and GLSL ES 3.00 from one source. Source: examples/index.ts, https://github.com/typeshade/typeshade/blob/d894fc0/examples/index.ts - 146 test files. Source: every *.test.ts in the tree at d894fc0, https://github.com/typeshade/typeshade/tree/d894fc0 - 0 runtime dependencies. Source: package.json, https://github.com/typeshade/typeshade/blob/d894fc0/package.json - On every push, Tint compiles every WGSL emit and a real WebGL2 context links every renderable example's GLSL ES 3.00. Source: scripts/compile-gate.ts, https://github.com/typeshade/typeshade/blob/d894fc0/scripts/compile-gate.ts - A CPU oracle executes the same source in double precision. Source: src/core/oracle.ts, https://github.com/typeshade/typeshade/blob/d894fc0/src/core/oracle.ts