Skip to content

Repository files navigation

ShaderToy Cloner

🌐 Versión en español

Local server to clone and play shaders from ShaderToy, designed to be used as an animated wallpaper with Lively Wallpaper.

Bypasses Cloudflare restrictions by serving shaders from localhost, with support for multi-pass shaders, textures, and cubemaps.


Windows Defender false positive

The installer and bundled .exe may be flagged by Windows Defender as Trojan:Win32/Bearfoos.B!ml. This is a known false positive caused by the way pkg bundles the Node.js runtime and server code into a single executable — a pattern that heuristic scanners sometimes misidentify.

The full source code of this project is available here for review. The release binaries are built transparently via GitHub Actions directly from this repository with no manual steps.

If you prefer not to trust the pre-built binary, you can run from source instead.

To allow the installer to run: open Windows Security → Virus & threat protection → Protection history, find the quarantined item, and choose Allow.


Features

  • Clone shaders directly from a ShaderToy URL (requires API key)
  • Import shaders from an exported JSON file (no API key needed)
  • WebGL2 playback fully compatible with the ShaderToy format
  • Support for single-pass and multi-pass shaders (Buffer A/B/C/D → Image)
  • Transparent proxy for textures and cubemaps from the ShaderToy CDN
  • Control panel with a gallery of cloned shaders
  • Dark mode interface
  • Install as a Windows service (auto-start with the system)
  • UI language switcher (English / Spanish)

Requirements

  • Node.js v18 or higher
  • Windows 10/11
  • A ShaderToy API key (only needed to clone via URL; not required for JSON import)

Installation

Windows installer (recommended)

Download ShaderToy-Cloner-Setup-x.x.x.exe from the latest release and run it as Administrator. It installs the app as a Windows service that starts automatically with Windows.

See the note above if Windows Defender flags the installer.

Run from source (no installer)

If you prefer to run directly from source without a pre-built binary:

git clone https://github.com/your-user/shadertoy-cloner.git
cd shadertoy-cloner
npm install
npm start

Usage

Start manually

npm start

The server starts at http://localhost:7700.

Initial setup

  1. Open http://localhost:7700 in your browser.
  2. Click Settings and enter your ShaderToy API key.
  3. Save the changes.

Clone a shader

  • Via URL: paste the ShaderToy URL into the clone field (requires API key).
  • Via JSON: export the shader from ShaderToy and use the Import JSON option (no API key required).

Use with Lively Wallpaper

  1. In the control panel, copy the URL of the shader shown below its thumbnail.
  2. In Lively Wallpaper, select "Add wallpaper""URL/Web" and paste the copied URL.

Install as a Windows service

To have the server start automatically with Windows, without needing to keep a terminal open:

Requirement: run as Administrator

# Open PowerShell as Administrator and run:
node install-service.js

This registers the "ShaderToy Cloner" service in Windows with the following settings:

Parameter Value
Service name ShaderToy Cloner
Port 7700
Auto-start Yes (with the system)
Restart on failure Yes (up to 5 attempts)
Environment NODE_ENV=production

Verify the service is running

Get-Service -Name "ShaderToy Cloner"

Uninstall the service

# Open PowerShell as Administrator and run:
node uninstall-service.js

Project structure

shadertoy-cloner/
├── server.js               # Express server (entry point)
├── install-service.js      # Windows service installer
├── uninstall-service.js    # Windows service uninstaller
├── package.json
├── public/
│   ├── index.html          # Control panel
│   ├── player.html         # Shader player
│   ├── js/
│   │   ├── i18n.js         # Internationalization (EN/ES)
│   │   ├── app.js          # Control panel logic
│   │   └── renderer.js     # WebGL2 rendering engine
│   └── css/
│       └── style.css
└── data/
    ├── settings.json       # Configuration (API key, port)
    └── shaders/            # Cloned shaders (JSON)

REST API

Method Route Description
GET /api/settings Get current configuration
POST /api/settings Update configuration
GET /api/shaders List cloned shaders
GET /api/shaders/:id Get shader data
DELETE /api/shaders/:id Delete a shader
POST /api/clone Clone shader from URL
POST /api/import Import shader from JSON
GET /proxy/* Proxy for ShaderToy CDN resources
GET /shader/:id Shader player page

Tech stack

  • Backend: Node.js, Express, Axios, fs-extra
  • Frontend: JavaScript (ES6+), WebGL2, HTML5/CSS3
  • Windows service: node-windows

License

MIT

About

A ShaderToy cloner, for localhost serving. Useful for Lively Wallpaper

Topics

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages