Docs
WGPU Blur Backend
WGPU Blur Backend
cpyvn supports a dedicated wgpu blur backend for blur transitions.
Current status
- Blur is currently buggy.
- WGPU blur is more buggy and less stable than CPU blur.
Install
pip install -r requirements-wgpu.txt
Enable in project.json
Set wgpu_blur to true:
{
"name": "demo",
"entry": "script.vn",
"wgpu_blur": true,
"wgpu_backend": "Vulkan"
}
wgpu_backend is optional. Useful values:
VulkanOpenGLMetalDx12
When enabled:
- cpyvn initializes
WgpuBlurBackendfromvn/gpu/blur_wgpu.pyx. - if
wgpu_backendisOpenGL, cpyvn probes it in a subprocess first to avoid hard crashes on unstable drivers. scene ... blur,show ... blur, andoff ... bluruse the GPU backend when available.blend blurcurrently uses the CPU path for stability/consistency across drivers.- if
wgpuinit fails, runtime falls back to CPU blur (no hard stop). - if a software adapter (like llvmpipe/swiftshader) is detected, cpyvn disables wgpu blur and uses CPU fallback.
- if
ui.show_perfis enabled, perf overlay shows:- GPU adapter specs
- blur backend (
WgpuBlurBackendor CPU) - GPU/CPU blur call counters
Disable
Set wgpu_blur to false (or remove the key).
Blur transitions will use the CPU fallback path.
Note
Blur on flat-color backgrounds can look subtle. For visual verification, test blur between image backgrounds or on character sprites.
If perf overlay shows GPU Type: CPU (llvmpipe), keep wgpu_blur off on that machine.
You can still force-enable software backend for debugging:
CPYVN_WGPU_ALLOW_SOFTWARE=1 python main.py --project games/demo
If Vulkan is unstable on your host, try:
"wgpu_backend": "OpenGL"