scp-fs2open / fs2open.github.com

Origin Repository for SCP FreeSpace 2 Open
https://www.hard-light.net/
Other
407 stars 164 forks source link

Nebula poofs with transparency are too bright #2221

Open Goober5000 opened 4 years ago

Goober5000 commented 4 years ago

This requires a particular set of circumstances...

Scroll of Atankharzim uses custom nebula poofs. These worked fine in 3.7.4, but as of 3.8.0, they are much too bright: https://cdn.discordapp.com/attachments/223511363807346691/662690627128918049/unknown.png

However, removing the post-processing command-line flag allows them to display at their proper brightness. screen0123

I noticed that the Scroll poofs appear to have a transparent background, while the MediaVP poofs (which display fine) have a black background. However, Scroll and MVP poofs alike have alpha channels.

Removing the alpha channel, or merging the poof with a back background, does not work for Scroll because this happens: screen0122

I used DXT5 compression and "generate mipmaps" for modifying the Scroll poof.

Goober5000 commented 4 years ago

After a bit of experimenting, saving the new poofs as DXT1 allows them to work properly, and removes the weird line and color artifacts.

So essentially what this comes down to is that nebula poofs with transparency do not work at some point subsequent to 3.7.4. Nebula poofs with opaque backgrounds work as expected.

Goober5000 commented 3 years ago

Unless this is easy to figure out, it can probably be closed as "won't fix". Scroll has a workaround, and no other mod seems to have this problem.

But before closing this I'd like an opinion from @Baezon or someone else familiar with the nebula code.

Baezon commented 3 years ago

I have seen this form of "image corruption" before, notably this was a case of a particle effect with transparency without the soft_particles cmd line flag enabled. The exact particulars of why it is rendered this way is unfortunately beyond me however...

Additionally, I have very recently used poofs with transparency, and they had different, less severe glitches. There sadly does not appear to be an issue for it #3279 but it was the same symptoms others have noted with transparency used for background bitmaps, where the colors are very highly saturated and severely posterized.

It's clear that the particular format being used (usually .dds), the presence of transparency, and the existence of certain cmd line flags like post-processing and soft_particles are all related to causing these issues to happen, but it's not yet clear to exactly how they relate, or how to fix it.

Edit: slightly misread the issue! But suffice it to say then I have noticed this was well (as your actual problem image lines up pretty well with what I was describing in my second paragraph). Knowing approximately where it started does help though.