Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Weird Text Transparency Issue

A topic by RubyDev created 33 days ago Views: 41 Replies: 3
Viewing posts 1 to 4

This is a weird one, maybe you have seen it before, somehow anything e.g.: sprites in world, other canvas, "shines" on/through my text!?

It's also weird, because when I fade the text, it's even more visible, shouldn't my panel behind (unity: image) cover everything behind the background up then?

In this gif, I adjust the fade of the Super Text Mesh component and then it can be seen even more how a panel from another canvas "shines through".

I really don't have any funky setup going on here, no masking, no canvas groups. It's just a simple hierarchy setup:

(1 edit)

PS: Happens with both Universal and Ultra Shader. I am using the build you sent me. Happens with both SDF Mode ON or OFF.

Tried variety of different tick-boxes, tried Mask Mode, nothing changes behavior. 

Tried different integers for render-queue too.

It also happens on other fonts, e.g.: tried it with the Liberation Sans font or Legacy Runtime font and still happens.

Also tried in a blank component with no tags at all, even white text will be a bit blue with a light-blue sprite behind it in the world. Here is additionally a screenshot with the component:


Additional Info: This seems to only happen in the area the font is "antialiased".

In my pixel font with filtering set to "point" I cannot reproduce, I can reproduce it on a non-pixel font though, even if it's set to filtermode point.
Additional gif, showcasing the behavior:


One more insight, I am playing with outline just to see how it interacts with the issue.

I put a red square behind my text and outline seems to have the same issue of the background shining through:


Okay, I know I am kinda spamming here at this point but, I did try to reproduce it in the mask demo scene (just picked any of your demo scenes) and initially struggled to reproduce the bug.

I found the bug comes from my camera "stack" setup.

All my UI is filmed by a "UI Camera" and rendered into a render texture which the main camera displays via another canvas element.

This only happens if I do it this way, so if I render the text into a render texture. Instead of doing this though, I now actually use real camera stacking and swapped my UI camera to be an "overlay" camera. Now the bug does not exist.

So I think the bug must relate to:

  • My Render texture setup (screenshot below if you care enough to try to reproduce my mess)
  • How Super text mesh is seen by a camera and then written into render textures
  • How raw image renders the render texture (I tried no material and with material on the raw image component, nothing changed)