bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Extreme Bloom on non-emissive dark surface. WebGl2 & Linux only

Open paul-hansen opened this issue 1 year ago • 3 comments

Bevy version

v0.14.0

Relevant system information

cargo 1.79.0 (ffa9cf99a 2024-06-03) rustc 1.79.0 (129f3b996 2024-06-10) Arch Linux (EndeavorOS), KDE, (tested both Wayland and X11) Firefox 127.0.2 & Chrome 126.0.6478.126 Nvidia 3080 Driver version 555.58.02

AdapterInfo { name: "NVIDIA GeForce GTX 980, or similar", vendor: 4318, device: 0, device_type: Other, driver: "WebGL", driver_info: "2.0", backend: Gl }

What you did

I imported a model in my game that had a black material with a metallic value of 1.0

What went wrong

I was expecting it to display the same on PC and web, but on the web, the bloom went bonkers and covered the whole screen.

Additional information

I was able to replicate this in Bevy's bloom_3d example by changing one of the materials, specifically replace these lines with this:

    let material_emissive3 = materials.add(StandardMaterial {
        base_color: Color::BLACK,
        metallic: 1.0,
        ..default()
    });

Here's a screenshot of my game, with the PC version running normally: image Here's in Firefox showing the issue with the bloom (same result in Chrome) image

paul-hansen avatar Jul 12 '24 02:07 paul-hansen

Doesn't happen on Windows 11 on the same machine. Chrome 126.0.6478.127 & Firefox 127.0.2

paul-hansen avatar Jul 12 '24 03:07 paul-hansen

Looks like a NaN/Inf issue to me.

JMS55 avatar Jul 12 '24 05:07 JMS55

Also might be related: If you have HDR enabled and you set the clear color to transparent value (common for multiple camera setups), the screen quickly transitions to full bright white color looking very similar to this.

IDEDARY avatar Jul 12 '24 14:07 IDEDARY

Still happening on an updated machine with latest nvidia drivers. I haven't seen this happen with anything other than Bevy.

Here's it happening with the new foxtrot community example: https://janhohenheim.itch.io/foxtrot Image

EDIT: The foxtrot example has been changed to require webgpu, this wasn't the case when I posted this comment. Webgpu is still behind flags on linux browsers so not easy to test anymore. You can try my game at https://prawl.itch.io/bitcycles to see the bloom issue without webgpu, though I haven't released the source.

paul-hansen avatar May 27 '25 19:05 paul-hansen