Semi transparency in GUI broken (SOLVED)

#1

As I said in another post I am rebuilding an old project and now I found another issue that I guess have something to do with pre-multiplication of alpha. I have a summary screen that is a GUI with a white background with alpha 0.2 to fade out the game behind it, which worked fine before (about a year ago), but now the background is fully opaque when rendered above the game.
In the editor it will only apply on areas of the screen with other gui.

Has something changed around pre-multiplication of alpha in GUI over the last year or so that might explain the behaviour?

0 Likes

#2

Here is another example of the same thing. The pale lock in the image should not be visible. It’s alpha is 0 and Blend Mode is Alpha. In the editor it’s invisible as it should, but when I run it gets this way, which to me look like it is drawn with an additive blend mode
lock

0 Likes

#3

Hmm, yes, probably. Can you share a bare bones example where we can reproduce this problem?

0 Likes

#4

I found a “Premultiply alpha”-checkbox in the texture profiles. Have tried to uncheck that, but as stated in the other post, building my projects takes quite some time when using texture profiles so I don’t know yet if it fixes the issue…

0 Likes

#5

You could try disabling texture compression or settle for a lower compression ratio while you test.

0 Likes

#6

So the setting will have effect even with texture compression off?

0 Likes

#7

Ah, no, my bad. But maybe if you lower the compression ratio so that it is faster?

0 Likes

#8

Building with Fast compression is still over 1.5hrs and disabling premultiply alpha did not do the trick as far as I can see. Think I need to create that repro project…

0 Likes

#9

Could you share your texture profiles file? It may have some issues.

Have you tested bundling on any other computers?

0 Likes

#10

How old is this project? In nov 2017 some builtin shaders were changed to premultiply alpha there instead of on cpu, so maybe if you have some custom shaders since before that they would need updating.

3 Likes

#11

I found the issue. The gui shader had changed and I was using my own version of it. I looked before but didn’t see the small change in how color was treated in the vertex program. Consider this solved and we’ll continue the adventure of my long building times in the other thread… :slight_smile:

6 Likes

#12

Great find Erik! Thanks

2 Likes