Skip to content

Black square artifacts when using CameraFrame Bloom or DoF Post-Processing #7492

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

Open
Christopher-Hayes opened this issue Mar 29, 2025 · 9 comments · May be fixed by #7605
Open

Black square artifacts when using CameraFrame Bloom or DoF Post-Processing #7492

Christopher-Hayes opened this issue Mar 29, 2025 · 9 comments · May be fixed by #7605
Assignees
Labels
area: graphics Graphics related issue bug

Comments

@Christopher-Hayes
Copy link
Contributor

Christopher-Hayes commented Mar 29, 2025

Description

When using either Bloom or Depth of Field (DoF), a black square flashes randomly on the screen. At certain places in my scene I can reliably cause these artifacts to show.

The strange thing is the 3D modeler I work with does not see these artifacts at all.

Another unusual thing is this happens with my much more powerful desktop, and does not happen on my laptop.

Related Forum post from another user: Artifacts with cameraFrame bloom

Screenshots

In-scene example

Image

Screenshots from Spector.js.

Previous frame New frame with the artifact
Image Image

On Discord, I've DM'd Martin the Spector.js save file shown in the screenshots above.

Reproducibility

Testing with a custom local-compiled engine I'm seeing this on the latest commit as of March 28, 2025.

I also went back as far as engine v2.3.1 (Dec 4, 2024) and was seeing the same artifacts. Testing earlier versions wasn't possible without rewriting the camera-frame script.

Machine A (Desktop)

Bug reproducible? YES - frequent artifacting, easy to reproduce

Graphics: nvidia rtx 3090 (discrete)
Browsers: Firefox 136 (stable, snap), Chrome 134 (stable, deb)
HDR monitor: No
OS: Ubuntu 24.10 (Wayland)

WebGL Report

Image

Machine B (Laptop)

Can reproduce? NO - no artifacts at all

Graphics: Intel UHD (integrated) + nvidia Quadro T1000 (discrete)
Browsers: Firefox 136 (stable, snap), Chrome 134 (stable, deb)
HDR monitor: No
OS: Ubuntu 24.10 (Wayland)

WebGL Report

Image

@mvaligursky mvaligursky self-assigned this Mar 31, 2025
@mvaligursky mvaligursky added bug area: graphics Graphics related issue labels Mar 31, 2025
@MAG-AdrianMeredith
Copy link
Contributor

duplicate of #7105

@MAG-AdrianMeredith
Copy link
Contributor

I originally wasn't able to repo on my mac but many users with nvidia graphics were. However at one point i did find an internal build that could and just added a clamp to the final output as a workaround

@Christopher-Hayes
Copy link
Contributor Author

duplicate of #7105

I saw that issue, but the video showed a different looking bug. I don't see any lines on my side and I don't experience the screen going black. I can get the artifacts to take up the whole screen if I mess with Bloom scaling, but they still have a flashing effect rather than blanking the whole screen.

@mvaligursky
Copy link
Contributor

Bug reproducible? YES - frequent artifacting, easy to reproduce

Is there a repro I can get my hands on? Without repro, there is not much we can do.

I have a repro using this example in WebGL mode (WebGPU does not reproduce the issue for me). I have a fix / workaround, but this is only a problem with sphere / disk area lights, which you likely are not using.

@Christopher-Hayes
Copy link
Contributor Author

Christopher-Hayes commented Apr 7, 2025

Bug reproducible? YES - frequent artifacting, easy to reproduce

Is there a repro I can get my hands on? Without repro, there is not much we can do.

I have a repro using this example in WebGL mode (WebGPU does not reproduce the issue for me). I have a fix / workaround, but this is only a problem with sphere / disk area lights, which you likely are not using.

I've made one here: https://playcanvas.com/project/1326102/overview/bloom-artifacts--black-squares
I just took the basic cube example, tossed in the camera frame script, turned on Bloom, and I can see the black square artifacts.

Screencast.From.2025-04-07.12-23-20.webm

Full disclosure - this is not the exact camera frame script. I could not make ESM work on my project, so this script is result of adapting it to the legacy format, there's a chance I made a scripting error.

@LeXXik
Copy link
Contributor

LeXXik commented Apr 7, 2025

I have 3090 as well, so decided to give it a try.

With the given example project with a cube, I could not repro on Win11. Both Firefox and Chrome do not have black box artifacts.

However, I was able to repro under Ubuntu (WSL).

Steps:

  • Launch WSL
  • download, install and launch Chrome:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install
google-chrome-stable

Running Chrome without a sudo might throw some errors to the WSL console about failing getting access to Vulkan drivers. You can avoid those with sudo. However, the black box is there regardless, so the issue is probably somewhere else.

@mvaligursky
Copy link
Contributor

I cannot repro on Win 11 RTS 2070.
@Christopher-Hayes - are your drivers up to date?

@Christopher-Hayes
Copy link
Contributor Author

Christopher-Hayes commented Apr 7, 2025

I cannot repro on Win 11 RTS 2070. @Christopher-Hayes - are your drivers up to date?

Yeah, I'm on 570. Which I realize with nvidia is not necessarily a good thing. 😅

NVIDIA GeForce RTX 3090
Driver Version: 570.124.06
CUDA Version: 12.8

I am on ubuntu + wayland. I can try windows, and see if it's gone.

@Christopher-Hayes
Copy link
Contributor Author

Christopher-Hayes commented Apr 7, 2025

Okay, so I can confirm like LeXXik did, that the bug does not happen on Windows. On both Firefox and Chrome on Windows, there is no artifacting.

Here's the WebGL report for the same computer, but Windows instead of Ubuntu.

WebGL Report

Image

This probably isn't helpful, but I did look at other engines to see if I can find instances of the same bug. Babylon, THREE, Bevy, and Filament are all showing bloom without artifacts for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants