WesselKroos / youtube-ambilight

This browser extension adds ambient light to YouTube videos
MIT License
79 stars 8 forks source link

Implement the new WebGPU API as a third renderer option #167

Closed WesselKroos closed 8 months ago

WesselKroos commented 1 year ago

The new WebGPU API has now been made available in the Chrome stable release channel. Implementing this could improve performance a lot, since the WebGPU API makes it possible to avoid the copy steps between multiple Canvas2D/WebGL contexts.

There are already 2 renderers implemented: Canvas2D and WebGL. A new WebGPU renderer could be added to that setting as a third option.

Docs: https://www.w3.org/TR/webgpu/ https://gpuweb.github.io/gpuweb/explainer/ https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API https://developer.chrome.com/blog/webgpu-release/

WesselKroos commented 8 months ago

Investigation result Chromium and Firefox already avoid the copy steps. So this renderer will not improve performance.