Transparency / Fog Problem with Standard Shader

Hey guys,

I hope you can help me. I am currently working on a SciFi Interface Package for the asset store.
I tested out some effects to make sure everything will work fine for the ones purchasing this package. Then I ran into the problem, that as soon as I turn on Fog in the Scene Settings, the transparency stops working.

Here you can hopefully see my dilemma : )

On the left side you see what happens when I turn on the fog.
This happens with all three available types of fog.

  • I am using the latest version of Unity 5 but the free version.
  • The shader is a standard (spec workflow) shader
  • TGA with alpha channel in the Albedo Channel and in the Emissive Channel

I approached it this way, because I wanted to leave the choice of color to the customer of the package which at the moment can be easily tweaked via the color picker.

Is there an alternate way to get the same result without having any problems with effects and such?

I really hope you can help me! This is driving me nuts :smile:

Kind regards,

Moritz
Awesome Assets

I just noticed, that this might not be the appropriate section. I would be glad if someone could move this to the general “Graphics” section. : )

I’d have to test it to be sure, but I reckon you can make a new shader and simply add Fog Off to the tags.

1 Like

Okay, thanks a lot, Thomas. I will try this out in the next few day. I will let you know if it helped :slight_smile:

Hmm, I took it for a spin but I couldn’t really get the desired results. However, I also couldn’t reproduce the buggy transparent textures either - everything looks as it should with just the fog set in the lighting settings. Maybe there’s something else interfering, like post process effects or other lighting options?

First of all, thanks for your help! :slight_smile:

I figured out, that when I use a Global Fog Script as a Post Processing Effect on the camera the Problem disappears. Yet this is not a real solution to the problem.

Damnit, if I only knew more about shaders : D