Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
chromaticAberrationCorrection property of the
XRCompositionLayer interface is a boolean enabling the layer's optical chromatic aberration correction.
Chromatic aberration ("color fringing") is an imperfection wherein a lens fails to focus all wavelengths of colors at the same point. This effect results in a seven-colored rainbow. To remove these imperfections a process called chromatic aberration correction is needed. For more information, read Chromatic aberration on Wikipedia.
true enables chromatic aberration correction for the layer;
false disables it.
If the device doesn't support this feature,
null and setting it will not do anything.
chromaticAberrationCorrection was changed, it will take effect in the next frame.
Setting a layer's chromatic aberration correction
The following code snippet enables the layer's chromatic aberration correction.
myLayer.chromaticAberrationCorrection = true;
|WebXR Layers API Level 1 |
BCD tables only load in the browser