Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Additive Shader and Sprite Sheets @ Partikel-System

Discussion in 'Shaders' started by Shoorty, Oct 18, 2015.

  1. Shoorty

    Shoorty

    Joined:
    Mar 2, 2015
    Posts:
    12
    Hello guys,

    i've a short question. im building a fire effect with a particle-system. i tried all the different standard particle shaders of unity.

    My sprite sheet has 6x6 flames on it with black background.

    My question just covers the theorie behind the shader. If i take Additive/Additive(Soft), the fire looks nice, black background is then transparent. But if i take one of the other particle shaders, it isn't.

    What's the difference ? Why does it not work with multiply shader, ... ?

    How does it exactly work, that only the black background gets transparent ?


    Thanks a lot, i've read some information about shaders and so on, but didnt understand it well. I read about the Blending, but didnt got it, how the blending is set at additive, so just the black background will get transparent.

    Greetz !
     
  2. Shoorty

    Shoorty

    Joined:
    Mar 2, 2015
    Posts:
    12
    no one an explanation ready ? :)
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Texture need to be premultiply.
     
  4. Shoorty

    Shoorty

    Joined:
    Mar 2, 2015
    Posts:
    12
    and this is the explanation for which question ?
    sry, i thought i get an answer i can understand and dont need to interpret :(
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    http://effectronica.com/?p=1512

    This article explains what premultiplied is, and why it can achieve both bright and darkening, which is what you are looking for. You will have to get a native speaker to better interpret it for you if you have difficulty.

    You want the section beginning with:

     
  6. Shoorty

    Shoorty

    Joined:
    Mar 2, 2015
    Posts:
    12
    it's less understanding what u write but more that u didnt write much, but ok - so no difficulty :)

    ok thx!
     
  7. MikaelT

    MikaelT

    Joined:
    Mar 23, 2013
    Posts:
    15