MisterEd
Posts: 141
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

WebGl support for the Pi

Thu Aug 01, 2019 1:42 am

Can someone comment on whether there has been any progress on WebGl support for the Pi. Hardware acceleration for WebGl would be a plus for the Pi.

User avatar
Gavinmc42
Posts: 7636
Joined: Wed Aug 28, 2013 3:31 am

Re: WebGl support for the Pi

Thu Aug 01, 2019 2:47 am

Pi4 with Buster and Chromium will do WebGL2.0.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

MisterEd
Posts: 141
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: WebGl support for the Pi

Thu Aug 01, 2019 3:20 am

Gavinmc42 wrote:
Thu Aug 01, 2019 2:47 am
Pi4 with Buster and Chromium will do WebGL2.0.
That must be why Scratch 3.0 online with Chromium works now.

When I tried Scratch 3.0 online with my Pi 3B+ a few months ago it was so slow it was unusable. I guess I'll try my Pi 3B+ with Buster to see if Scratch 3.0 works any better.

hippy
Posts: 14411
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: WebGl support for the Pi

Thu Aug 01, 2019 11:40 am

MisterEd wrote:
Thu Aug 01, 2019 3:20 am
Gavinmc42 wrote:
Thu Aug 01, 2019 2:47 am
Pi4 with Buster and Chromium will do WebGL2.0.
That must be why Scratch 3.0 online with Chromium works now.

When I tried Scratch 3.0 online with my Pi 3B+ a few months ago it was so slow it was unusable. I guess I'll try my Pi 3B+ with Buster to see if Scratch 3.0 works any better.
It shouldn't. It's not Buster which allows better WebGL but the VideoCore change which came with the Pi 4B, as I posted in your other thread.

User avatar
Botspot
Posts: 1879
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: WebGl support for the Pi

Thu Aug 01, 2019 12:51 pm

MisterEd wrote:
Thu Aug 01, 2019 1:42 am
Hardware acceleration for WebGl would be a plus for the Pi.
I am basing this information on my experiences with a Pi 3.

When using Buster, I had to use raspi-config to enable the GL driver. After that, Scratch 3 worked pretty well.
But I have also discovered that FydeOS, essentially chromebook OS for pi, has fully hardware accelerated WebGl and therefore runs Scratch 3 better than Raspbian. But that's Pi 3 performance, and I am sure a Pi 4 will run Scratch 3 fine either way.
Easily install anything on your Pi using Pi-Apps. Over 2 million users.
Over 200 apps including image editors, IDEs, games, web browsers, appearance themes, and more to upgrade your Raspberry Pi desktop.
More info: https://github.com/Botspot/pi-apps

hippy
Posts: 14411
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: WebGl support for the Pi

Thu Aug 01, 2019 3:37 pm

hippy wrote:
Thu Aug 01, 2019 11:40 am
MisterEd wrote:
Thu Aug 01, 2019 3:20 am
When I tried Scratch 3.0 online with my Pi 3B+ a few months ago it was so slow it was unusable. I guess I'll try my Pi 3B+ with Buster to see if Scratch 3.0 works any better.
It shouldn't. It's not Buster which allows better WebGL but the VideoCore change which came with the Pi 4B, as I posted in your other thread.
I might have to take that back. Just re-tried on a 3B (non-plus) and online Scratch 3 is running perfectly and fluidly in Chromium with less than 50% CPU usage.

I could have sworn it was much worse than that when I previously tried with Buster so either I was misremembering or maybe something has changed.
Botspot wrote:
Thu Aug 01, 2019 12:51 pm
When using Buster, I had to use raspi-config to enable the GL driver. After that, Scratch 3 worked pretty well.
Seems perfectly good for me with the G1 Legacy drivers on my 3B (non-plus) as per above.

In fact, it seems I cannot use anything but that. Even though raspi-config lets me select the Fake or Full KMS, insists I reboot having done so, it seems to have reverted to Legacy when I re-run raspi-config.

That's something for another day to figure out.

MisterEd
Posts: 141
Joined: Mon Apr 16, 2018 5:28 am
Location: Huntsville, AL USA

Re: WebGl support for the Pi

Sun Aug 04, 2019 3:39 am

I created a new card for the Raspberry Pi 3B+ with Buster on it. Still no hardware acceleration in Chromium.

chrome://gpu
* WebGL: Hardware accelerated but at reduced performance
* WebGL2: Unavailable

I checked the Chromium settings. It showed hardware acceleration enabled.
chrome://settings
Advanced
System
Use hardware acceleration when available [Enabled]

I then checked the Chromium flags. Now I found something to change...
chrome://flags
Experiments
Override software rendering list [Disabled]
Change to
Override software rendering list [Enabled]

I tried again...
chrome://gpu
* WebGL: Hardware accelerated
* WebGL2: Hardware accelerated

Note that on the Raspberry Pi 4B by default:
chrome://gpu
* WebGL: Hardware accelerated
* WebGL2: Hardware accelerated

User avatar
Gavinmc42
Posts: 7636
Joined: Wed Aug 28, 2013 3:31 am

Re: WebGl support for the Pi

Sun Aug 04, 2019 4:01 am

Wonder how the WebGL2 is done on the 3B+ with the VC4?
I don't remember testing for that because I thought OpenGLES 3.0 was needed for WebGL2.

Need to fire up a 3B+, they have been sitting idle since I got the 4.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Botspot
Posts: 1879
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas

Re: WebGl support for the Pi

Fri Nov 08, 2019 6:18 pm

MisterEd wrote:
Sun Aug 04, 2019 3:39 am
I then checked the Chromium flags. Now I found something to change...
chrome://flags
Experiments
Override software rendering list [Disabled]
Change to
Override software rendering list [Enabled]

I tried again...
chrome://gpu
* WebGL: Hardware accelerated
* WebGL2: Hardware accelerated
There's a problem with this approach... Chromium still isn't hardware accelerated, even though it says it is. See here, and I quote:
Chrome has an option to override the software rendering list (#ignore-gpu-blacklist), but this option does not enable hardware accelerated video decoding. After enabling this option, you may find the following when visiting chrome://gpu: "Video Decode: Hardware accelerated", but this does not mean it actually works.
See a similar topic, short answer is to enable OpenGL via raspi-config. (Pi4 uses OpenGl by default, that's why it works fine out of the box)
Image
Easily install anything on your Pi using Pi-Apps. Over 2 million users.
Over 200 apps including image editors, IDEs, games, web browsers, appearance themes, and more to upgrade your Raspberry Pi desktop.
More info: https://github.com/Botspot/pi-apps

Return to “General discussion”