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

Smaller PostEffect refactor and simplification, WebGPU support #4996

Merged
merged 1 commit into from Jan 25, 2023

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Jan 20, 2023

  • the vertex shader all posteffects use is moved to the base class to avoid duplication, and adjusted to handle WebGPU y-flip.
  • standalone pc.drawFullscreenQuad function has been deprecated, and a simpler member function has been added instead: drawQuad(target, shader, rect), which uses existing drawQuadWithShader that supports WebGPU
  • PostEffect.shader has been removed, as it's not used by the class.
  • post effect shader is created using pc. pc.createShaderFromCode instead of new pc.Shader, which handles platforms differences and allows it to run on WebGPU
  • posteffect-outline script has been adjusted to work with this as a test. When this PR gets approved, other post effects would be adjusted too.

This makes the ModelOutline example work on the WebGPU (without omni shadows for now)

Screenshot 2023-01-20 at 15 33 09

@mvaligursky mvaligursky self-assigned this Jan 20, 2023
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Jan 20, 2023
@mvaligursky mvaligursky merged commit e2b3ecb into main Jan 25, 2023
@mvaligursky mvaligursky deleted the mv-posteffect-refactor branch January 25, 2023 10:16
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.

None yet

2 participants