Who it is forAn experienced front-end or graphics developer who needs an effect that the built-in library does not provide.
The problemOff-the-shelf components may not match a specific visual, and building a GPU effect from nothing is costly.
The outcomeA reusable custom component with typed props, mounted in a page alongside the built-in effects.
What you need first
- Node.js and npm to install the shaders package
- A project using React, Vue, Svelte, Solid, or plain JavaScript
- A browser with WebGPU support for the effects to render
- A free shaders.com account if you want to use the design editor or CLI sync
Steps
- Read the Custom Components guide at https://shaders.com/docs/guide/custom-shaders and the Primitives reference.
- Create a file that imports defineShader, wgsl, transformColor, and transformPosition from 'shaders/std'.
- Define the component with a name, a props object with defaults and transforms, and a paint wgsl block.
- Mount the new component in your page the same way as a built-in component and check the rendered output.
Prompt for your agent
In the shader-effects-inc/shaders repo, write a custom defineShader component named <component-name> in <project-path> that draws <effect-description>. Expected output: one new component file and a page that mounts it. Verify that the wgsl paint block returns a vec4f and that the props match the defaults.
Caveat. The README marks composing from std primitives as experimental and writing WGSL directly as stable, so prefer the WGSL route for production work.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for shader-effects-inc/shaders and "Write a custom WebGPU component with defineShader"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer