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

Black boxes on nvidia/linux #51

Open
scallyw4g opened this issue Feb 28, 2024 · 1 comment
Open

Black boxes on nvidia/linux #51

scallyw4g opened this issue Feb 28, 2024 · 1 comment

Comments

@scallyw4g
Copy link
Owner

Shawnecy reported some sparkling black boxes on linux. We investigated for an hour or two but didn't get to the bottom of them. What we found out:

  • They appear during the gaussian blur of the bloom texture
  • They reduce in frequency quickly on startup, sometimes surging in frequency again for short amounts of time
  • It appears they are not caused by an error in the lighting shader calculations
  • The only system we've seen them repro on is his; a 4090 on driver (IIRC 515.something) ( the screenshot he sent disappeared in discord)
@Shawnecy
Copy link

The artifacts in question:

image

These artifacts are positioned consistently across multiple executions of the application. I took a screenshot of the program immediately after startup multiple times, and the images are all the same as above.

If I resize the application window, the artifacts change aspect ratio to match:

image

If I run the turn_based example project and load a fireball or if I load the transparency project, then the artifacts blink briefly before going away. The artifacts do not return if I load other projects, but they do return if I shut down game_loader and start it back up.

Removing this line from api.cpp eliminates the artifacts:

if (Graphics->Settings.UseLightingBloom) { GaussianBlurTexture(&Graphics->Gaussian, &Graphics->Lighting.BloomTex, &Graphics->Lighting.BloomTextureFBO); }

I tinkered with this line in Lighting.fragmentshader, removing one term at a time and testing, and each time the artifacts remained:

    TotalLight = (Diffuse*KeyLightContrib*ShadowVisibility) +
                 (Diffuse*AmbientLightContrib*BlurredAO) +
                 (Diffuse*BackLightContrib*BlurredAO) +
                 (PointLightsContrib*BlurredAO) +
                 Fog;

My machine:
OS: Linux Mint 21.2 Victoria (Cinnamon) (x86_64)
Kernel: 5.15.0-94-generic
Screen resolution: 2560x1440
CPU: Intel i9-10900K (20) @ 5.300GHz
GPU: RTX 4090, 24gb
GPU Drivers: nvidia-driver-545 (545.29.06-0ubuntu0.22.04.2)

Those are the latest drivers for my OS, but the previous version (535.161.07-0ubuntu0.22.04.1) are the recommended drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants