Search Unity

Particles in particle system not being lit

Discussion in 'Global Illumination' started by Neeko, May 2, 2015.

  1. Neeko

    Neeko

    Joined:
    Mar 9, 2012
    Posts:
    24
    I have a sprite that I want to use in my particle systems (it's just 4x4 white square). I'd also like for the particles to be lit (react to lighting within a scene).

    Since I'm using 2D Toolkit, I simply created a new tk2d sprite collection of just the single texture, generating normals for it within the sprite collection settings, set the shader for the atlas0 material that's generated to LitBlendVertex and attached the atlas0 material to the particle system.

    However, the particles are not reacting to light. I've tried different shaders (both Unity and tk2d) but to no avail. I also messed with the particle systems normal direction setting but still nothing.

    Is there something I'm missing to get particles in a particle system to be lit?
     
  2. Neeko

    Neeko

    Joined:
    Mar 9, 2012
    Posts:
    24
    Bump.
     
  3. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
    Vertex-lit work like crap, I never got it working properly. You will need custom shaders to get them properly lit. It is achievable. Actually, getting them to react for directional light is the easiest part. The catch is - particles are generated in camera space so you will need to transform them into world space to get proper point and spot light handling. I am selling lit particles shader pack which reacts to one, strongest directional light (I am working on point and spot light support), cast shadows, has self-shadowing but does not accept shadows.

    If you are interested - here's Asset Store link.