Indy FX adds animated shader effects to Foundry VTT tokens/tiles/templates and regions. Import easilly from shadertoy, edit and configure - then drag/drop the shaders onto tokens/tiles/templates, apply to regions or assign as lights. Extensive API provided.
This file is the GM/player usage guide.
For macro/API details, see `README_API.md`.
Quick Start
1. Enable the module.
3. Open **Shader Library** - from Scene Controls (token/tile/template view).
4. Import a shader (or bundled examples) from shadertoy - click on Import Shadertoy JSON and follow instruction.
5. Apply the shader to tokens, tiles, templates, or regions.
6. Edit shaders from button on token/tile/template.
7. You can also apply shaders to region via indyFX region behaviour.
Main Workflows
Shader Library
- Search/filter imported shaders by name or label.
- Hover a card to animate preview.
- Double-click a card to open full shader editor.
- Right-click a card for: `Add to Selected`, `Create Macro (Tokens/Tiles/Templates)`, `Duplicate`, `Delete`.
- Drag/drop a card onto a token/tile/template to apply.
- Import/Export library from the library window.
- If no imported shaders exist, Indy FX can prompt to import bundled examples from `scripts/shaders.json`.
Apply to Tokens/Tiles/Templates
- Drag/drop from Shader Library.
- Or open placeable config and use the **indyFX** section/menu.
- Or use macros/API (`game.indyFX...`).
- If a token/tile/template has Indy FX, its HUD includes an **Edit** button that opens the shader editor for that instance.
Apply to Regions
- Add Region Behavior type **indyFX**.
- Configure shader/options in behavior config.
- Multiple region effects are supported on the same region.
Use Imported Shaders as Light Animations
1. Open an imported shader in the full editor.
2. Enable **Convert to Light Source**.
3. Configure light options:
- **Use Illumination Shader**
- **Use Background Shader**
- **Light Falloff**: `None`, `Use Bright/Dim`, `Linear`, `Exponential`
- **Light Coloration Intensity** (default `1`)
- **Light Illumination Intensity** (default `1`)
- **Background Glow** (default `0`)
4. Save the shader.
5. In Ambient Light config, choose the animation `Indy FX: <Shader Label>`.
Notes:
- Light animation registrations are synced at startup and when the shader library changes.
- For light usage, placeable capture channel modes are remapped to scene capture where needed.
Channel Modes
Imported shader channels (`iChannel0..iChannel3`) support:
- `none` (black)
- `white`
- `noiseRgb`
- `noiseBw`
- `sceneCapture`
- `image` (image/video path)
- `buffer` (ShaderToy-style buffer source)
- `tokenTileImage` (placeable image capture)
Notes:
- `tokenTileImage` is placeable-target specific and not suitable for region usage.
- Preview backgrounds used for scene/placeable capture channels are configurable in module settings.
- Const/#Define variables in the shader will be exposed in Edit Variables dialog
- Look at how the example shaders are set up with regard to filling in tokens/tiles and respecting alpha/rotation etc.
- The majority of shadertoy shaders should import and compile OK - check console log for shader compile issues.
Persistence
- Token/Tile/Template effects persist when `displayTimeMs = 0`.
- Timed effects (`displayTimeMs > 0`) do not persist.
- Persistent region effects are behavior-based (`indyFX` Region Behaviors).
Broadcast vs Local
- Most UI actions and generated macros use broadcast methods.
- GM-only broadcasting can be enabled in settings.
- Local API methods are still available for client-side use.