Creating the particle shader

In Unity particle systems use a unique kind of shader. We will create this next:

  1. In the Project panel, click on the PACKT_Shaders folder to view its contents in the Assets panel.
  2. In an empty area of the Assets panel, create a new shader. Right-click and choose Shader | Unlit Shader.


    Unlit shaders do not respond to scene lighting. This makes them a great choice for particle effects that tend to use billboard textures rather than being actual geometry.

  3. Rename the new shader flameJet.
  4. Double-click on the shader to open it in MonoDevelop.
  5. In MonoDevelop, change the first line of the shader to match the following:
            Shader "PACKT/Unlit/flameJet" 

    Putting this shader in an Unlit subfolder will make it easy to select when ...

Get Mastering Unity Shaders and Effects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.