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

A few minor issues in imageBlur #438

Open
mkvenkit opened this issue Aug 7, 2024 · 2 comments
Open

A few minor issues in imageBlur #438

mkvenkit opened this issue Aug 7, 2024 · 2 comments

Comments

@mkvenkit
Copy link

mkvenkit commented Aug 7, 2024

Thanks for the interesting sample!

I noticed these minor issues:

  1. buffer0 and buffer1 in main.ts are associated with flip in the the shader, but where are these buffers being written to? I didn't see associated buffer write calls.
  2. samp seems unused in the shader.
  3. cubeTexture - naming is a little confusing.
@greggman
Copy link
Collaborator

greggman commented Aug 7, 2024

  1. buffer0 and buffer1 in main.ts are associated with flip in the the shader, but where are these buffers being written to? I didn't see associated buffer write calls.

They are set when they are created using mappedAtCreation, calling getMappedRange(), setting the value, and then unmaping.

  • buffer0 is just a buffer with 0 in it
  • buffer1 is just a buffer with 1 in it

One or the other is bound to flip. Bind buffer0 to not flip, bind buffer1 to flip. They don't need to be updated.

  1. samp seems unused in the shader.

samp is used, line 52 of blur.wsgl

  1. cubeTexture - naming is a little confusing.

Agreed. Will rename

@mkvenkit
Copy link
Author

mkvenkit commented Aug 7, 2024

They are set when they are created using mappedAtCreation, calling getMappedRange(), setting the value, and then unmaping.

Sorry, missed that. Thanks for the quick response!

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

No branches or pull requests

2 participants