Search Unity

Alpha Blended Particles + Fog = Fail?

Discussion in 'Shaders' started by klabauterklaus, Feb 23, 2010.

  1. klabauterklaus

    klabauterklaus

    Joined:
    Feb 9, 2010
    Posts:
    9
    Perhaps I'm missing something, but when I set the Material of a Particle Emitter to "Particles / Alpha Blended" and turn on fog, the particles are blended incorrectly (fade to black instead of fog color). Is there any way around this problem?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The shader uses "Fog { Color (0,0,0,0) }", so the solution is to use a custom shader, which would be a copy&paste from the standard one, without the black fog.

    --Eric
     
  3. klabauterklaus

    klabauterklaus

    Joined:
    Feb 9, 2010
    Posts:
    9
    Cheers for the solution, will do that!

    Makes me wonder why they put it in like that in the first place.. Makes sense for Additive particles, but for Alpha Blended :?