Search Unity

Additive Shader: Color looks so washed out

Discussion in 'General Graphics' started by compyler, Sep 10, 2021.

  1. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    102
    Hello,

    I want to create a laser for my mobile game with a line renderer. For the material I used Mobile/Particles/Additive cause it gives a nice glow effect.

    I want a red laser and my texture is indeed very reddish:


    The final result in Unity looks very yellow and washed out though:

    It has the glow effect, but I barerly see any red.

    Actually I don't understand why its that transparent. As you can see in the texture there is a big red rectangle around the white line (with 0 alpha) and I can't see that red rectangle at all in the final rendering.

    Does anyone understand whats going on here and/or has an idea how I can make my laser red?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Additive here literally means adding the color of the particle to the color that has been previously rendered.

    If you're over a background of light grey (RGB 0.5, 0.5, 0.5) and add solid red (RGB 1.0, 0.0, 0.0) you get RGB 1.5, 0.5, 0.5, which gets clamped to display value of RGB 1.0, 0.5, 0.5, or a light pink.

    You want Particles/Alpha Blended
     
  3. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    102
    You were completely right. I was able to kinda achieve the effect with your suggested Particles/Alpha Blended shader. Thank you!