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

Standard shader compatibility improvements for WebGPU #4568

Merged
merged 3 commits into from
Aug 22, 2022

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Aug 19, 2022

  • 2d texture sampling is using texture2DBias instead of texture2D to allow macro replacement for WebGPU
  • Uniform buffer handles additional uniform types - alignment, setup
  • adding extensions earlier in the shader code to avoid warnings

@mvaligursky mvaligursky self-assigned this Aug 19, 2022
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Aug 19, 2022
@mvaligursky mvaligursky mentioned this pull request Aug 19, 2022
@willeastcott
Copy link
Contributor

This seems to touch a lot of front end chunks. Are we concerned this is going to break a lot of projects that override chunks?

@mvaligursky
Copy link
Contributor Author

This seems to touch a lot of front end chunks. Are we concerned this is going to break a lot of projects that override chunks?

I'm not, old chunks still work, just on WebGPU if they use the bias.

Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please get 1 more approval on this one... 😄

Copy link
Contributor

@GSterbrant GSterbrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably move the chunk changes to another PR just to keep them separate, seeing as they take up the majority of the changes in this PR.

src/graphics/uniform-buffer-format.js Show resolved Hide resolved
src/graphics/uniform-buffer-format.js Show resolved Hide resolved
src/graphics/uniform-buffer-format.js Show resolved Hide resolved
src/graphics/uniform-buffer-format.js Show resolved Hide resolved
@mvaligursky
Copy link
Contributor Author

I would probably move the chunk changes to another PR just to keep them separate, seeing as they take up the majority of the changes in this PR.

It's painful to split PRs where lots of little things change to get shader compilation moving, I'm not sure its worth it.

@mvaligursky mvaligursky merged commit 8518d47 into main Aug 22, 2022
@mvaligursky mvaligursky deleted the mvaligursky-texture-bias-webgpu branch August 22, 2022 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants