Overview
Custom Pipeline graphics mods allow advanced users to replace Dolphin’s internal pixel shader with custom GLSL code. This enables complete control over final pixel output, including custom lighting, normal mapping, texture manipulation, and visual effects.Graphics Mod Integration
Custom pipelines are defined as graphics mod actions. You must be familiar with the graphics mod format before using custom pipelines.Action Type
The action type iscustom_pipeline with the following structure:
array
required
Array of rendering passes. Currently only single-pass is supported.
Complete Example
Shader Format
Entry Point
All custom shaders must provide this entry point:Output Structure
struct
Input Data Structure
struct
Lighting Data
struct
TEV Stage Data
TEV (Texture Environment) stages represent GameCube/Wii graphics operations.struct
TEV Input Types
Shader Examples
Single Color Output
Display Normal Map
Reading Custom Texture
First Game Texture
Display the first texture the game uses, ignoring other operations:Point Light Lighting
Apply point lighting for channel 0 color lights:Texture Sampling
Access textures usingsamp_<NAME> samplers defined in your material asset:
Time-Based Animation
Usedata.time_ms for animated effects:
Best Practices
Performance Considerations
Performance Considerations
- Minimize texture lookups in loops
- Cache frequently accessed values
- Use early returns when possible
- Avoid complex branching in inner loops
Compatibility
Compatibility
- GLSL is converted to backend-specific shaders (D3D, Vulkan, Metal)
- Test on multiple backends if possible
- Avoid GLSL extensions unless necessary
- Use standard GLSL types and functions
Debugging
Debugging
- Start with simple solid colors to verify shader loads
- Output intermediate values as colors for visualization
- Check Dolphin log for shader compilation errors
- Use
data.final_coloras fallback
Shaders are compiled at runtime. Syntax errors will prevent the graphics mod from loading.
Limitations
- Single pass only: Multi-pass rendering not currently supported
- Pixel shaders only: Vertex shaders cannot be customized
- View space only: Position and normal data are in view space, not world space
- Backend conversion: GLSL is converted to target API, some features may not translate
Related Topics
Graphics Mods
Learn the graphics mod system basics
Resource Packs
Package mods for distribution