playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.69k stars 1.36k forks source link

Investigate implementation of OffscreenCanvas API #2481

Open mvaligursky opened 4 years ago

mvaligursky commented 4 years ago

Investigate implementation of https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas. This would give us:

issacclee commented 2 years ago

Hi guys, Is there any update regarding to implement this feature?

slimbuck commented 2 years ago

Hi @issacclee, we've not spent time investigating this yet. Probably not high priority until there is support in Safari?

slimbuck commented 2 years ago

@mvaligursky wondering whether webgpu supports this out of the box?

mvaligursky commented 2 years ago

it does not in the initial release, but the support is expected later.

issacclee commented 2 years ago

Thanks for answering guys, am I right to assume that this probably won't get implemented unless Safari starts to support the spec?

mvaligursky commented 2 years ago

It will be implemented, when somebody has some time and considers this a high priority, regardless of the Safari (and Firefox by the way) support. Benefits on the android platform which is mostly using Chrome browser could be very nice. Perhaps somebody from our community of contributors could implement this as well, as this is an open source engine.

issacclee commented 1 year ago

https://webkit.org/blog/13686/release-notes-for-safari-technology-preview-161/ FYI, safari will be getting offscreencanvas as shown here in the new tech review release announcement.

mvaligursky commented 1 year ago

Based on this: https://www.construct.net/en/blogs/ashleys-blog-2/safari-releases-development-1616

Safari 16.4 rolled out in March 2023. Safari 16.4 adds support for OffscreenCanvas, but only the "2d" context - WebGL remains unsupported.

Maksims commented 1 year ago

This fall webgl context will be added for offscreencanvas to Safari. https://webkit.org/blog/14205/news-from-wwdc23-webkit-features-in-safari-17-beta/

mvaligursky commented 9 months ago

related: https://github.com/playcanvas/engine/pull/5168

mvaligursky commented 3 months ago

I'll reopen this as I don't think we have all we need to easily allow users to run the rendering on a worker, which is the goal here.