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

Some Examples are broken on Mobile WebGL #4582

Open
NHodgesVFX opened this issue Apr 24, 2022 · 5 comments
Open

Some Examples are broken on Mobile WebGL #4582

NHodgesVFX opened this issue Apr 24, 2022 · 5 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds

Comments

@NHodgesVFX
Copy link

Bevy version

I'm not sure, its whatever version of bevy the web examples are using at the time of writing this, if it tracks release then bevy 0.7

Operating system & version

S22 Ultra, Android 12

What you did

  1. Open Chrome or FireFox on Android
  2. Navigate to https://bevyengine.org/examples/3d/lighting/ or https://bevyengine.org/examples/3d/spherical-area-lights/
  3. Wait for the scene to load

What you expected to happen

The example scene renders without artifacts

What actually happened

the scene rendered with artifacts

Additional information

Any additional information you would like to add such as screenshots, logs, etc.

image
image

@NHodgesVFX NHodgesVFX added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 24, 2022
@superdump superdump added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Apr 25, 2022
@superdump
Copy link
Contributor

Looks like a bug with clustered forward rendering. Perhaps the cluster index calculation breaks for some reason and then the cluster is shaded with the wrong light list.

@astreetsign
Copy link

astreetsign commented Aug 14, 2022

same thing is happening on arch linux i am using amd juniper gpu

@james7132 james7132 added the O-Web Specific to web (WASM) builds label Dec 10, 2022
@mrchantey
Copy link
Contributor

mrchantey commented Mar 10, 2023

On my old pixel 3 the scene isnt rendering, might be a different issue from the OP. I can confirm that this is an issue with the Standard Material only, simple unlit materials render with no issue.

ERROR  Shader translation error for stage VERTEX | FRAGMENT | VERTEX_FRAGMENT: Assertion failed: false && "Unknown named pointer type or missing metadata"
ERROR  Please report it to https://github.com/gfx-rs/naga log.target = "wgpu::backend::direct";log.module_path = "wgpu::backend::direct";log.file = "C:\\Users\\petey\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\wgpu-0.15.1\\src\\backend\\direct.rs";log.line = 1183;
ERROR  Handling wgpu errors as fatal by default log.target = "wgpu::backend::direct";log.module_path = "wgpu::backend::direct";log.file = "C:\\Users\\petey\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\wgpu-0.15.1\\src\\backend\\direct.rs";log.line = 3023;

panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `pbr_opaque_mesh_pipeline`
    Internal error in VERTEX | FRAGMENT | VERTEX_FRAGMENT shader: Assertion failed: false && "Unknown named pointer type or missing metadata"
    ', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.15.1/src/backend/direct.rs:3024:5

Stack:

Error
    at imports.wbg.__wbg_new_abda76e883ba8a5f (https://bevyengine.org/examples/3d/lighting/lighting.js:385:21)
    at console_error_panic_hook::hook::hef349c3cbcd73eef (wasm://wasm/057fe4da:wasm-function[10143]:0xb43173)
    at core::ops::function::Fn::call::hbe3ada901a6538a9 (wasm://wasm/057fe4da:wasm-function[45864]:0xf05cd7)
    at std::panicking::rust_panic_with_hook::h8d0a63d0479a36c8 (wasm://wasm/057fe4da:wasm-function[16696]:0xd4b378)
    at std::panicking::begin_panic_handler::{{closure}}::hac9eebb5245da5ff (wasm://wasm/057fe4da:wasm-function[18755]:0xdad96e)
    at std::sys_common::backtrace::__rust_end_short_backtrace::h1def76e070463564 (wasm://wasm/057fe4da:wasm-function[28550]:0xead550)
    at rust_begin_unwind (wasm://wasm/057fe4da:wasm-function[23912]:0xe5a9a2)
    at core::panicking::panic_fmt::h2a7f454a5f5da218 (wasm://wasm/057fe4da:wasm-function[27247]:0xe9b424)
    at core::ops::function::Fn::call::h8465aa2f6e6af7ec (wasm://wasm/057fe4da:wasm-function[16745]:0xd4dfe2)
    at wgpu::backend::direct::ErrorSinkRaw::handle_error::h1674e5c163f32e93 (wasm://wasm/057fe4da:wasm-function[11776]:0xbec21f)

Referenced section in wgpu/backend/direct.rs

impl crate::context::QueueWriteBuffer for QueueWriteBuffer {
    fn slice(&self) -> &[u8] {
        panic!()
    }
...

@mrchantey
Copy link
Contributor

mrchantey commented Oct 20, 2023

Update: The Bevy 0.11 WASM examples are currently working fine on my old Pixel 3 Android.

Edit: Lighting example still pixelated like OP.

@NHodgesVFX
Copy link
Author

Sadly, the lighting example for me is still broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

No branches or pull requests

5 participants