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

WebGPU Support #3986

Open
mvaligursky opened this issue Feb 4, 2022 · 2 comments
Open

WebGPU Support #3986

mvaligursky opened this issue Feb 4, 2022 · 2 comments
Assignees
Labels
area: graphics Graphics related issue feature
Milestone

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Feb 4, 2022

This is the root ticket of WebGPU Implementation, and will be updated regularly to keep it up to date with new issues to work on and the work done.

For live preview, visit the url on up to date Chrome: https://playcanvas.github.io/

instancing.mov
grab.pass.720.mov
refraction.mov
shadows.mov
render.to.cubemap.mov
morphing.mov
post-effects.mov
skinning.mov
clustered-shadows.mov
mrt.mov

Class layout overview

  • graphics folder will have two subfolders created for respective implementations: /webgl, /webgpu
  • existing GraphicsDevice class will be platform independent, and WebglGraphicsDevice and WebgpuGraphicsDevice will extend it to implement platform specific implementations.
  • other graphic classes, such as VertexBuffer, IndexBuffer and similar will be split into 3 classes as well, and this is the example structure:
// base platform independent class
class VertexBuffer {
    impl = null;   // platform dependent implementation (WebglVertexBuffer or WebgpuVertexBuffer)
};

Refactorings
The engine will undergo extensive refactoring, to more natively and with better performance support WebGPU API.

Issues:

PRs:

Partial list of missing features:

@mvaligursky mvaligursky added feature area: graphics Graphics related issue labels Feb 4, 2022
@mvaligursky mvaligursky self-assigned this Feb 4, 2022
@willeastcott willeastcott changed the title WebGPU Implementation (Root ticket) WebGPU Support Oct 20, 2022
@willeastcott willeastcott moved this to In Progress in PlayCanvas Roadmap Oct 20, 2022
@willeastcott willeastcott added this to the Q2 2023 milestone Jan 24, 2023
@willeastcott willeastcott modified the milestones: Q2 2023, Q3 2023, Q4 2023 Oct 3, 2023
@willeastcott willeastcott modified the milestones: Q4 2023, Q2 2024 Feb 11, 2024
@erikdubbelboer
Copy link
Contributor

@mvaligursky https://poki.com/en/g/village-builder is now running the WebGPU enabled build of PlayCanvas. At Poki we capture erros, so I'm seeing a bunch of WebGPU related errors now. Would you like me to create separate issues for those or maybe just post comments for them here? The errors all affect less than 1% of the players, so if you don't have time you can also ignore them. I have some stack traces and device/browser information with them as well.

These are the most occurring error messages:

console.error: ["Failed to link shader program. 'tex2Dgrad': no matching 2 parameter intrinsic function
AbortError: Failed to execute 'mapAsync' on 'GPUBuffer': Device is lost
RangeError: Failed to execute 'createBuffer' on 'GPUDevice': createBuffer failed, size is too large for the implementation when mappedAtCreation == true
TypeError: Cannot read properties of undefined (reading 'renderTarget')
Failed to transpile webgl vertex shader [Shader Id 3 LitShader-ShadowPass_1_0-proc] to WebGPU: [GLSL compilation failed] while rendering undefined
TypeError: a.vertexAttribDivisor is not a function (doesn't seem WebGPU related but only happens in this latest release)

@mvaligursky
Copy link
Contributor Author

@erikdubbelboer - please create multiple issues on these with the details you have, keen to see what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature
Projects
Status: In Progress
Development

No branches or pull requests

3 participants