Troubleshooting Guide
Common issues and solutions for the WebGPU Particle Fluid Simulation.
Table of Contents
- Browser Compatibility Issues
- Initialization Errors
- Performance Problems
- Visual Issues
- Mobile-Specific Issues
- Getting Help
Browser Compatibility Issues
WebGPU Not Supported
Error Message: WebGPU is not supported in this browser
Cause: Browser doesn't support WebGPU API
Solution:
- Use Chrome 113+, Edge 113+, or Safari 17+
- Enable WebGPU in Firefox: Set
dom.webgpu.enabledtotrueinabout:config - Check caniuse.com/webgpu for current support
Check WebGPU Support:
// In browser console
if (!navigator.gpu) {
console.log('WebGPU is not supported');
}
Browser Version Too Old
Symptoms: Simulation won't start, console shows errors
Solution:
- Update Chrome/Edge to latest version
- Update Safari to macOS 14+
- Use Chrome on Windows/Linux for best support
Initialization Errors
"GPU adapter not found"
Cause: No compatible GPU or hardware acceleration disabled
Solutions:
Check GPU Acceleration:
- Chrome: Visit
chrome://gpu - Ensure "Hardware Acceleration" is enabled
- Chrome: Visit
Update GPU Drivers:
- NVIDIA: Download latest from nvidia.com
- AMD: Download from amd.com
- Intel: Use Windows Update or Intel Driver Assistant
Disable Software Rendering:
- Chrome Settings → System → Disable "Use graphics acceleration when available"
- Restart browser
- Re-enable and restart
"Device unavailable"
Cause: GPU in use by another application
Solutions:
- Close other GPU-intensive applications
- Restart browser
- Check if other browser tabs are using WebGPU
Canvas element not found
Error Message: Canvas element not found
Cause: HTML structure changed or canvas element missing
Solutions:
Ensure
index.htmlcontains:<canvas id="canvas"></canvas>Check for JavaScript errors before initialization
Performance Problems
Low FPS (<30)
Possible Causes:
Too many particles for device
- Solution: Adaptive quality should have auto-adjusted
- Check HUD for "particles" count
Other tabs using GPU
- Close other browser tabs
- Close GPU-heavy applications
Energy saver mode (macOS/iOS)
- Disable energy saver
- Connect to power
Browser extensions blocking GPU
- Disable GPU-accelerated extensions
- Try incognito/private mode
Laggy Mouse Interaction
Cause: High frame time or input handling issues
Solutions:
- Reduce particle count (edit
src/config/sim.ts) - Check if browser is hardware accelerated
- Try different browser (Chrome > Safari for WebGPU)
Visual Issues
Black Screen
Possible Causes:
WebGPU not initialized properly
- Check console for errors
- Ensure browser supports WebGPU
Particles off-screen
- Resize browser window
- Refresh page
Shaders failed to compile
- Check console for shader errors
- Clear browser cache and refresh
Particles Not Appearing
Solutions:
Check particle initialization:
// In DevTools console, check if initialized const particleCount = simulationSettings.particleCount; console.log(`Particles: ${particleCount}`);Verify canvas size:
// Check if canvas has size const canvas = document.getElementById('canvas'); console.log(`Canvas: ${canvas.width}x${canvas.height}`);Clear browser cache:
- Ctrl+Shift+R (Windows/Linux)
- Cmd+Shift+R (macOS)
Colors Look Wrong
Cause: Color mapping or shader issues
Solutions:
- Check console for shader compilation errors
- Verify
COLOR_MAX_SPEEDin config - Try refreshing the page
Trails Not Showing
Cause: Trail texture or shader issues
Solutions:
- Check
TRAIL_FADE_ALPHAvalue (should be ~0.05) - Verify trail pass is executing
- Check browser console for errors
Mobile-Specific Issues
Touch Not Working
Symptoms: No interaction when touching screen
Solutions:
Ensure touch events are enabled:
- Implementation already includes touch support
- Check if JavaScript is enabled
Browser zoom interfering:
- Reset zoom to 100%
- Disable zoom in browser settings
Check accessibility settings:
- Ensure touch isn't being redirected
Mobile Performance Issues
Solutions:
Reduce particle count manually:
// Edit src/config/sim.ts export const PARTICLE_COUNT = 2500; // Lower for mobileUse mobile browser:
- Safari on iOS (better WebGPU support)
- Chrome on Android
Close background apps:
- Free up device resources
Orientation Change Issues
Symptoms: Simulation breaks on rotation
Cause: Resize handler not updating properly
Solutions:
- Refresh page after rotation
- Implementation should auto-handle (check
reconfigureContextin main.ts)
Debug Steps
When experiencing issues, follow these steps:
Step 1: Check Console
- Open DevTools (F12)
- Go to Console tab
- Look for red error messages
- Copy error message for reporting
Step 2: Verify WebGPU Support
// Run in console
console.log('WebGPU supported:', !!navigator.gpu);
if (navigator.gpu) {
const adapter = await navigator.gpu.requestAdapter();
console.log('Adapter:', adapter);
}
Step 3: Check Canvas
// Run in console
const canvas = document.getElementById('canvas');
console.log('Canvas:', canvas);
console.log('Context:', canvas?.getContext('webgpu'));
Step 4: Monitor Performance
// Check FPS in HUD or console
// FPS is displayed in top-left corner
Getting Help
Before Reporting Issues
- Check this guide thoroughly
- Try in a different browser
- Check if issue is browser-specific
When Reporting
Provide the following information:
Browser and Version
Chrome 122.0.6261.57 (Official Build)Operating System
macOS 14.3 (Darwin 23.2.0)Device Information
MacBook Pro 14", Apple M1 Pro, 16GB RAMIssue Description
- What you expected to happen
- What actually happened
- Steps to reproduce
Console Errors
- Copy and paste error messages
Performance Info (if applicable)
- Particle count shown in HUD
- FPS reading
Where to Report
- Bug Reports: Open an issue on GitHub
- Feature Requests: Use Feature Request template
- Questions: Start a discussion
Additional Resources
- API Documentation - For development questions
- Performance Benchmarks - Optimization tips
- Contributing Guide - For code contributions
Quick Reference
| Issue | First Try | Then Try |
|---|---|---|
| Won't start | Update browser | Check WebGPU support |
| Black screen | Refresh | Clear cache |
| Low FPS | Close other tabs | Reduce particles |
| No mouse | Check canvas | Try different browser |
| Touch issues | Refresh | Reduce particles |
| Console errors | Copy message | Report issue |
Last updated: 2026-04-16