Hacker News new | ask | show | jobs
by oplav 1271 days ago
I'm not the person you are responding to but I've been working on a web 3D rendering focused product for a bit now.

One issue that we've run into is that by default on laptops, Windows will not use an available discrete GPU in the browser. The only way to work around this is if you go to your power settings (not in the browser) and tell Windows to use the discrete GPU over an integrated one.

2 comments

I wasn't aware of that (though I don't know why I would be). That's very useful to know. Is this by default on battery, or by default full stop?
Our testing showed default full stop.
Are you saying that windows ignores the `powerPreference: "high-performance"` setting of the WebGL context creation?
Yes, we thought that was strange too but it kind of makes sense if the process is unaware that the GPU exists because of the OS settings.

As an aside, we also discovered that `powerPreference` is only a hint according to the spec, so there's no guarantee that an implementation will adhere to it: https://registry.khronos.org/webgl/specs/latest/1.0/