bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Some Examples are broken on Mobile WebGL

Open NHodgesVFX opened this issue 3 years ago • 3 comments

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 avatar Apr 24 '22 23:04 NHodgesVFX

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.

superdump avatar Apr 25 '22 04:04 superdump

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

astreetsign avatar Aug 14 '22 18:08 astreetsign

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 avatar Mar 10 '23 05:03 mrchantey

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

Edit: Lighting example still pixelated like OP.

mrchantey avatar Oct 20 '23 11:10 mrchantey

Sadly, the lighting example for me is still broken.

NHodgesVFX avatar Oct 20 '23 12:10 NHodgesVFX