fp64-sine-sweep.ts written in the source language.
fp64-sine-sweep-twin.shade.ts
At O0 and O1 the compiler emits WGSL from the level alone, so parentheses, minify, the number literals, obfuscate and the f64 emulation reach the GLSL tabs only. The f64 emulation still reaches the reflection at every level, since reflect() takes it on its own.
This file declares no @vertex entry, so it is compiled behind a fullscreen triangle that hands the fragment stage a uv running 0 to 1. The tabs and the canvas show that program.
TS
If VS Code did not open, the TypeShade extension may be missing. How to install it.
DiagnosticsReady to compile
Compile a module with a vertex entry and a fragment entry to see it drawn.
Run the fragment entry once per pixel, with no GPU.
Call console.log in a shader to see its lines here. A compute module logs every invocation. In a module that draws, click a pixel of the canvas, or record the whole frame on WebGPU.
The editor holds this example's own file, and the program is that file and any file it imports. An edit recompiles it in your browser, and the tabs beside the editor follow.