pygfx.renderers.wgpu.enable_wgpu_features
- pygfx.renderers.wgpu.enable_wgpu_features(*features)
Enable specific features (as strings) on the wgpu device.
This is an alias to
wgpu.preconfigure_default_device(.., required_features=...).WARNING: enabling features means that your code may not work on all devices. The point of wgpu is that it can make a promise that a visualization works and looks the same on any device. Using features breaks that promise, and may cause your code to not work on e.g. mobile devices or certain operating systems.
Features can also be turned off by prefixing with “!”. This e.g. allows using a subset of Pygfx on old hardware by using
enable_wgpu_features("!float32-filterable"). Use with care; some parts of Pygfx will not function without the default features enabled.This function must be called before before the first
Rendereris created. It can be called multiple times to enable more features. Note that feature names are invariant to use of dashes versus underscores.For more information on features:
wgpu.FeatureNamefor all possible official features.renderer.device.adapter.featuresfor the features available on the current system.renderer.device.featuresfor the currently enabled features.https://gpuweb.github.io/gpuweb/#gpufeaturename for the official webgpu features (excl. native features).
https://docs.rs/wgpu/latest/wgpu/struct.Features.html for the features and their limitations in wgpu-core.