Rendering Engine Overview
LightPaint features a sophisticated multi-layered rendering engine specifically optimized for light painting photography, combining Metal GPU acceleration with Core Image filters for both real-time preview and post-processing capabilities.
GPU Acceleration
Metal-powered processing for 60fps real-time preview and instant feedback
Advanced Blending
Multiple blend modes optimized for different light painting styles
Real-Time Light Trail System
Metal Shader Pipeline
Core Blending Modes:
Additive Blending
Classic light trail accumulation for bright, overlapping effects
Screen Blending
Bright light compositing that preserves highlights
Lighten Blending
Maximum blend mode for brightest pixels only
Star Trail Mode
Specialized for astronomy with luminance detection
Advanced Features:
- Luminance-based Processing: Analyzes pixel brightness for selective effects
- Threshold Controls: Only processes pixels above configurable brightness
- Color Temperature Adjustments: Optimizes warm/cool light sources
- Bloom and Glow Effects: Enhances bright sources for dramatic trails
Light Painting Detection
The app automatically detects light painting conditions:
Automatic Detection
- Long exposure settings (≥1.0 second)
- Manual camera controls active
- Light trails enabled in effects
- Profile name containing "light"
Optimization Results
- Enhanced light sensitivity
- Reduced noise in dark areas
- Improved trail persistence
- Real-time preview blending
Ambient Light Indicator
Light Indicator Bar
Visual guidance for optimal light painting conditions:
Optimal (Very Dark)Too Bright
Optimal
0-10%
Good
10-30%
Fair
30-50%
Poor
50-80%
Very Bright
80-100%
Brightness Warning System
- Automatic detection of environment brightness
- Visual and text warnings when conditions are too bright
- Recommendations for better results
- Real-time updates as lighting changes
Live Preview Blending
Real-time preview during capture:
Features
- Blends last captured frame with live camera feed
- Adjustable opacity (0.0-1.0) for preview intensity
- Core Image-based processing for quality
- Automatic enable/disable based on recording state
Benefits
- See your light painting as you create it
- Avoid overlapping unwanted areas
- Perfect for precise letter writing
- Helps compose complex patterns
Frame Processing Pipeline
###
1
Capture Phase
- Camera captures raw pixel buffer
- Brightness analysis for light painting conditions
- Optional live preview blending applied
- Frame metadata collection (timestamp, exposure)
###
2
Processing Phase
- Color controls (brightness, contrast, saturation)
- Light intensity filtering based on luminance
- Frame blending with accumulation buffer
- Motion blur for smooth trails
###
3
Post-Processing Phase
- Edge detection for enhanced definition
- Bloom effects for glow
- Trail fade for natural decay
- Final compositing and export
Performance Optimizations
Metal Optimizations
- Vertex buffer reuse for rendering efficiency
- Pipeline state caching
- Texture cache management
- Parallel compute dispatch
- Optimized shader compilation
Memory Management
- Autoreleasepool usage in capture loops
- Frame URL caching for temporal effects
- Configurable frame limits (max 250 frames)
- Automatic cleanup of processed frames
- Smart memory pressure handling
Performance Tips
For Best Performance
- Close other apps before recording
- Use lower resolution for longer sessions
- Enable Metal acceleration in settings
- Keep device cool during extended use
Quality vs Performance
- Higher frame limits = smoother trails
- More effects = increased processing time
- 4K export requires more memory
- Balance settings for your device
