Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When requesting WebGPU, browsers with no support fall back to WebGL 1 instead of WebGL 2 #1640

Open
emersonveenstra opened this issue Dec 7, 2024 · 2 comments · May be fixed by #1641
Open

Comments

@emersonveenstra
Copy link
Contributor

Description

Adding renderer=webgpu to a browser that doesn't support WebGPU will make Pixi fall back to WebGL 1, because Rapid is passing an undefined variable here:

preferWebGLVersion: renderGLVersion,

main...emersonveenstra:Rapid:webgl-fallback fixes it, and I think is safe because Pixi will automatically fall back to WebGL 1 if the browser doesn't support WebGL 2

Screenshots

No response

Version

canary

What browser are you seeing the problem on? What version are you running?

No response

The OS you're using

No response

Steps to reproduce

  1. Go to https://rapideditor.org/canary#map=2.00/0.0/-180.0&background=Bing&datasets=fbRoads,msBuildings&disable_features=boundaries&renderer=webgpu in Firefox or Safari (without enabling WebGPU support)
  2. Open Devtools
  3. See PixiJS 8.6.3 - webgl 1 - http://www.pixijs.com/

The browser URL at the time you encountered the bug

https://rapideditor.org/canary#map=2.00/0.0/-180.0&background=Bing&datasets=fbRoads,msBuildings&disable_features=boundaries&renderer=webgpu

The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)

No response

@emersonveenstra emersonveenstra changed the title When requesting WebGPU, Browsers with no support fall back to WebGL 1 instead of WebGL 2 When requesting WebGPU, browsers with no support fall back to WebGL 1 instead of WebGL 2 Dec 7, 2024
@bhousel
Copy link
Contributor

bhousel commented Dec 9, 2024

main...emersonveenstra:Rapid:webgl-fallback fixes it, and I think is safe because Pixi will automatically fall back to WebGL 1 if the browser doesn't support WebGL 2

Good catch, thanks @emersonveenstra ! I agree that looks safe to me too.

I kind of wonder - should we maybe have Rapid not start at all in this case?
The person testing might think they are using webgpu when they really are not, and this would be an opportunity to let them know that they need to adjust some settings in their browser to test it properly.

@emersonveenstra
Copy link
Contributor Author

Good catch, thanks @emersonveenstra ! I agree that looks safe to me too.

Cool, i'll open a PR

I kind of wonder - should we maybe have Rapid not start at all in this case?
The person testing might think they are using webgpu when they really are not, and this would be an opportunity to let them know that they need to adjust some settings in their browser to test it properly.

Might be useful, I also thought about using UiApiStatus to show an error in that case

@emersonveenstra emersonveenstra linked a pull request Dec 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants