WebKit / explainers

Explainers from WebKit contributors
371 stars 28 forks source link

Per-view user toggle to adjust power preference for model #72

Closed mehmetoguzderin closed 4 months ago

mehmetoguzderin commented 3 years ago

Progressive loading of media content is the same for almost all media types, and users can simply stop loading pages to avoid further data use. But going 3D, another dimension for progressive refinement comes along, which is the render's improvement over time. Although the idea of "maybe sites should avoid deploying costly scenes which hardware is under capable" is sound, people will likely want to display scenes that consist of content that creates a huge overhead even after the fetch from remote (which is the analogous part of progressive loading for the model that user can cancel already), increase of high-frequency detail in 3D content is a well-known trend, and people will want more of it when catering to a wider audience which might not be happy with blurry or under-defined regions.

In such scenarios, many techniques like upscaling, reducing samples per render (not only per pixel) exist that make it possible to improve time-to-first-display and increase fidelity over time. Browsers can ultimately deploy these to be more inclusive of challenging content. But this can come with a significant power draw. I think it might suit users' interest if the model can support a per-view (user might want a view to be improving but not the others) power preference toggle, which could hint browsers to drop any further refinement.

othermaciej commented 3 years ago

I think this would be an implementation question more than a spec/explainer question. One possible way to achieve this would be respecting system-wide “low power mode” settings where they exist.

mehmetoguzderin commented 3 years ago

@othermaciej I agree that browsers should definitely respect the system-wide power preference, though having a per-view toggle (or a JS interface for that? Not sure but to me, this felt like an essential one akin to play/pause or mute for video compared to still images) could extend applications. But it might be out-of-scope, as you pointed out. Thanks for building the model in any shape!

gsnedders commented 3 years ago

I think this would be an implementation question more than a spec/explainer question. One possible way to achieve this would be respecting system-wide “low power mode” settings where they exist.

Exposing something isn't unreasonable, given we already have the precedent of the powerPreference WebGL canvas attribute.

munrocket commented 3 years ago

Progressive loading is a thing. It is good to have an access to it as a WebCodec implementation in Safari. As I know it’s implemented in Chrome and WebKit turn now (as well as with webgpu/webxr). >=4K textures can loads slowly but rendered at 60fps.

grorg commented 3 years ago

Personally I'd like to avoid a powerPreference like attribute on the model. The idea is that you're handing the rendering off to the engine.

However, it seems that we'll have to expose some rendering hints, such as quality, and that's where something like the GPU preference might come in.

grorg commented 3 years ago

For example, in USD at least, you can specify properties for multiple renderers. If we were willing to live with the fact that visual output might differ more significantly between browsers than other web features, you could imagine setting a quality attribute that uses a slower but more accurate offline renderer.

mehmetoguzderin commented 3 years ago

@grorg A quality attribute could definitely take on the same function, implying whether the user wants the device to spend more energy on the progressive quality of the visual on a specific render element (thinking of low quality as roughly equal to spend low energy onto this view over time), I guess that would also mean spec should include temporal contribution to the render in the quality definition. Thanks!

marcoscaceres commented 4 months ago

Moved here https://github.com/immersive-web/model-element/issues/87