A system-wide shader overlay application for Android that applies RetroArch slang shaders on top of all content displayed on the screen.
- System-wide overlay: Works over games, apps, and system UI using
TYPE_APPLICATION_OVERLAY - RetroArch slang shader compatibility: Supports parsing and rendering of slang shader format
- Real-time shader processing: Hardware-accelerated OpenGL ES rendering
- Performance optimization: Shader compilation caching and configurable performance modes
- Transparency control: Adjustable opacity for overlay effects
- Battery efficient: Power-aware rendering with frame rate limiting
- OverlayService: Manages the system overlay window using WindowManager
- GLOverlaySurfaceView: Transparent OpenGL surface for shader rendering
- ShaderRenderer: OpenGL ES 2.0 renderer with shader pipeline
- ShaderManager: Handles shader compilation and caching
- Native Compiler: C++ shader compilation using simplified glslang approach
- SlangParser: Parses RetroArch .slangp preset files
Slang Shader → Native Compiler → GLSL → OpenGL Program → GPU Rendering
- Shader Caching: Compiled shaders cached to disk and memory
- Dynamic Quality: Performance-aware quality adjustments
- Frame Rate Control: Configurable FPS limits (30/60/120/unlimited)
- GPU Profiling: Real-time performance monitoring
SYSTEM_ALERT_WINDOW: Required for overlay functionalityFOREGROUND_SERVICE: For persistent overlay servicePOST_NOTIFICATIONS: Notification controls (Android 13+)
- CRT: Classic CRT monitor simulation with curvature and scanlines
- Scanlines: Horizontal scanline overlay effect
- LCD Grid: LCD subpixel pattern simulation
- Passthrough: No effect (transparency only)
Place .slangp preset files in assets/shaders/ directory.
- Android Studio Arctic Fox or later
- Android NDK for native compilation
- Minimum SDK: Android 8.0 (API 26)
- Target SDK: Android 14 (API 34)
- High Quality: Maximum visual fidelity
- Balanced: Optimized for performance and quality
- Battery Saver: Reduced quality for power efficiency
- Shader selection
- Opacity control (0-100%)
- Performance mode
- FPS limiting
- Auto-start on boot
setEGLContextClientVersion(2)
setEGLConfigChooser(8, 8, 8, 8, 16, 0)
holder.setFormat(PixelFormat.RGBA_8888)
setZOrderOnTop(true)// Native compilation pipeline
GLSL Source → Preprocessing → Validation → GPU ProgramWindowManager.LayoutParams().apply {
type = TYPE_APPLICATION_OVERLAY
format = PixelFormat.RGBA_8888
flags = FLAG_NOT_FOCUSABLE or FLAG_NOT_TOUCHABLE or FLAG_HARDWARE_ACCELERATED
width = MATCH_PARENT
height = MATCH_PARENT
}- Grant Permissions: Allow overlay permission in system settings
- Enable Overlay: Toggle overlay switch in main activity
- Configure Effects: Adjust settings for desired visual effects
- Performance Tuning: Monitor FPS and adjust performance mode as needed
- Works on most apps and games
- Cannot overlay on some system-critical windows (lockscreen, secure dialogs)
- Performance impact varies based on shader complexity and device capabilities
- Some anti-cheat systems may detect overlays
- Download APK from Releases
- Enable unknown sources in Android settings
- Install the APK and launch the app
- Grant overlay permission when prompted
- Choose a shader in settings and enable overlay
git clone https://github.com/mattakins/Shaderlay.git
cd Shaderlay
./gradlew assembleDebugWe welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Vulkan support for modern devices
- Real-time shader parameter adjustment
- Shader hot-loading from external sources
- Advanced multi-pass shader chains
- Custom shader editor interface
- Performance profiling tools
- Some anti-cheat systems may detect overlays
- Complex shaders may impact battery life on older devices
- Certain system dialogs cannot be overlaid (security limitation)
This project is licensed under the MIT License - see the LICENSE file for details.
- RetroArch for the slang shader format
- libretro/slang-shaders for shader examples
- Android OpenGL ES documentation and community
- Issues: GitHub Issues
- Discussions: GitHub Discussions
⭐ Star this repository if you find it useful!
