Svader allows you to create GPU-rendered Svelte components with WebGL and WebGPU fragment shaders for Svelte 4 and Svelte 5. A fragment shader is a program executed on the GPU that determines the color of each pixel on the screen. The Book of Shaders is a helpful resource for learning how to write fragment shaders. Svader provides examples that can be previewed on svader.vercel.app, with source code available in the src/routes/ directory. The WebGlShader and WebGpuShader components offer minimal examples of WebGL and WebGPU fragment shaders, respectively. While WebGL is more widely supported, WebGPU provides additional features and flexibility.
https://github.com/sockmaster27/svader