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

animate_shader example doesn't work on wasm #4813

Closed
johanhelsing opened this issue May 20, 2022 · 1 comment
Closed

animate_shader example doesn't work on wasm #4813

johanhelsing opened this issue May 20, 2022 · 1 comment
Labels
A-Animation Make things move and change over time A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds

Comments

@johanhelsing
Copy link
Contributor

johanhelsing commented May 20, 2022

Bevy version

Operating system & version

  • wasm
  • Firefox (Windows 11)
  • Chrome (Windows 11)

What you did

cargo run --example animate_shader --target wasm32-unknown-unknown

What you expected to happen

I'd expect to see the same thing as I see on desktop, but in the browser.

What actually happened

image

I see just a gray window with nothing in it, and this in the console.

WebGL warning: drawElementsInstanced: Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE

Additional information

Same thing happens in chrome, the warning I see is:

[.WebGL-00003B081B72A300] GL_INVALID_OPERATION: It is undefined behaviour to use a uniform buffer that is too small.
@johanhelsing johanhelsing added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 20, 2022
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-Animation Make things move and change over time O-Web Specific to web (WASM) builds and removed S-Needs-Triage This issue needs to be labelled labels May 20, 2022
johanhelsing added a commit to johanhelsing/bevy that referenced this issue May 20, 2022
Previously, it would draw nothing and complain with the following
console warnings:

Firefox:

WebGL warning: drawElementsInstanced: Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE

Chrome:

[.WebGL-00003B081B72A300] GL_INVALID_OPERATION: It is undefined behaviour to use a uniform buffer that is too small.

Issue: bevyengine#4813
johanhelsing added a commit to johanhelsing/bevy that referenced this issue May 21, 2022
Previously, it would draw nothing and complain with the following
console warnings:

Firefox:

WebGL warning: drawElementsInstanced: Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE

Chrome:

[.WebGL-00003B081B72A300] GL_INVALID_OPERATION: It is undefined behaviour to use a uniform buffer that is too small.

Issue: bevyengine#4813
@johanhelsing
Copy link
Contributor Author

Fixed in 1170b30 #6460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Animation Make things move and change over time A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants