Author Topic: Linux shadow glitch  (Read 1246 times)

0 Members and 1 Guest are viewing this topic.

Hey everyone,

First of all, I've been following the Freespace SCP for quite a while now and it's amazing what's been done with it so far.  Anyway, I have compiled FSO 3.8.0 on my Ubuntu 16.04 machine and I have found an odd visual glitch when I enable shadows.  In the tech room, a black box fills a full half of the viewbox for the model and it looks really unnatural.  Even stranger is that this still happens in missions, where it looks like the shadow of my ship is just a huge black box.  I have a few screenshots of this glitch as well as a debug log.  From what I can tell, GLSL isn't loading the shader properly, so it may be an issue with my drivers, but I'm not entirely sure.  I have even downloaded the proprietary Intel CPU drivers and I'm seeing this glitch.  I'm running a 64 bit Linux kernel with an Intel Haswell graphics chip.  Thank you.



[attachment stolen by Russian hackers]

 

Offline m!m

  • 211
It looks like your GPU does not support the features required for shadow support: Unsupported HW texture/renderbuffer format attached: MESA_FORMAT_RGB_FLOAT32

Try disabling shadows to see if that fixes the artifacts. I'll try to find a more graceful fallback for future versions.

 

Offline m!m

  • 211
I made some changes that should make sure that the fallback is more graceful than causing artifacts and OpenGL errors. If you know how to checkout and compile a pull request from GitHub here is the link: https://github.com/scp-fs2open/fs2open.github.com/pull/1471

 
The changes didn't work, I'm still getting the artifacting.  Interestingly, the error thrown during the creation of the framebuffer changed.  It now says that there are no attachments and that the default width or height is 0.  It doesn't stop it from creating the shadow framebuffer, so it never falls back on disabling shadows.

Code: [Select]
Trying to create 1024x1024 32-bit shadow framebuffer
OpenGL Debug: Source:OpenGL     Type:Other      ID:53   Severity:Medium Message:FBO incomplete: no attachments and default width or height is 0 [-1]

Shadow framebuffer created successfully.

 

Offline m!m

  • 211
I know the first error message and, at least in my tests, it was always printed before the framebuffer creation was completed but when the complete framebuffer was created everything worked fine. Do you have a full log with my changes?

 
Here's the log file.  Had to compress it to get it all in.

[attachment stolen by Russian hackers]

 

Offline m!m

  • 211
Just as I guessed. Mesa throws errors when using the framebuffer but not when creating it which means that there is no way to handle this gracefully. At this point I would consider this to be a bug in the driver software since it doesn't report the error through the intended OpenGL function.

The immediate solution for this problem would be to disable shadows which will fix the artifacts.

 
OK.  Thanks for your help.