bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
35.46k stars 3.5k forks source link

Downgrade. Skybox not working in wasm (worked in 0.12) #12558

Closed rewin123 closed 6 months ago

rewin123 commented 6 months ago

Bevy version

0.13

System information

Google Chrome

 AdapterInfo { name: "ANGLE (NVIDIA, NVIDIA GeForce RTX 3090 (0x00002204) Direct3D11 vs_5_0 ps_5_0, D3D11)", vendor: 4318, device: 0, device_type: Other, driver: "", driver_info: "", backend: Gl }

What I did

// Add skybox
cmd.entity(cameras.single()).insert((
    Skybox {
        image: cubemap.clone(),
        brightness: 1.0,
    },
    EnvironmentMapLight {
        diffuse_map: env_diffuse.clone(),
        specular_map: env_specular.clone(),
        intensity: 1.0,
    },
));

What went wrong

panicked at C:\Users\rewin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.3\src\backend\wgpu_core.rs:3006:5:
wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
      note: label = `skybox_pipeline`
    In the provided shader, the type given for group 0 binding 3 has a size of 4. As the device does not support `DownlevelFlags::BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`, the type must have a size that is a multiple of 16 bytes.

Additional information

All works in native build. If I remove skybox from camera all also works

rparrett commented 6 months ago

I don't think we had an issue tracking this, but it has been fixed by this PR: https://github.com/bevyengine/bevy/pull/12078

rparrett commented 6 months ago

Closing, as this has been fixed. The PR was already in the 0.13.1 milestone, so it'll be included whenever that gets released.

rewin123 commented 6 months ago

Thanks!