Shader System
TruchiEmu's advanced shader system transforms your retro gaming experience with real-time visual enhancements, CRT simulation, and modern post-processing effects. Built on Apple's Metal framework, our shader pipeline delivers pixel-perfect rendering with zero performance overhead.
Service Overview
The shader system in TruchiEmu leverages custom Metal shaders to provide real-time visual enhancements for emulated games. Unlike traditional emulator filters, our shaders run directly on the GPU, ensuring smooth 60fps performance even on complex effects like CRT simulation and scaling algorithms.
Shader processing pipeline from emulation core through Metal to display
Core Features
- Real-time Processing: All shaders execute on the GPU with sub-millisecond latency
- CRT Simulation: Authentic phosphor glow, scanlines, and curvature effects
- Scaling Algorithms: xBRZ, HQx, and custom integer scaling with aspect ratio preservation
- Color Enhancement: LUT support, color correction, and HDR tone mapping
- Performance Optimization: Automatic fallback to simpler shaders on lower-end hardware
Technical Architecture
The shader system consists of several key components:
- Shader Compiler: Runtime compilation of .metal shader files with error handling
- Effect Chain Manager: Stack multiple shaders with configurable ordering
- Parameter System: Real-time adjustment of shader uniforms via UI controls
- Fallback System: Automatic degradation to simpler shaders if compilation fails
Step-by-Step Configuration Guide
Basic Shader Setup
-
Access Shader Settings
Navigate to
Settings → Video → Shadersin the TruchiEmu menu bar. The shader panel will display available presets and custom shaders.
-
Select a Preset
Choose from built-in presets like "CRT-Consumer", "LCD-Sharp", or "Original Pixel". Each preset includes pre-configured shader combinations optimized for different display types.
-
Adjust Shader Parameters
Use the parameter sliders to fine-tune effects in real-time. Changes apply immediately without requiring a restart.