[SOLVED]Custom Shaders Does animate color?

I’ve sniffed the forums and Google and have failed at the internet.

How do I allow my custom shader to be manipulated by the “Does animate color?” values in the Particle Animator.

I already tried using the property

_TintColor (“Tint Color”, Color) = (1,1,1,1)

and it still doesn’t seem to affect it.

The particle animation colors are done with vertex colors. It’s not a single color that you set somewhere; every quad must be colored individually, so it uses the vertex colors.

–Eric

Check out some of the built-in shaders for particles. You’ll notice that they use “primary” in texture combining statements. Primary refers to vertex colour, which, when not using vertex lighting, is set directly in the mesh data. ParticleRenderers colour the vertices of each particle for you according to the animation function, so you just need to include primary in your colour calculations.

Thanks for the help guys, all is working well now. As Dan said I was not using “primary” in my calcs which was Part 1 of the problem.

Part 2 is that I needed to include

BindChannels {
  Bind "Color", color
  Bind "Vertex", vertex
  Bind "TexCoord", texcoord
}

in the shader. Which I just pulled from the built-in shader code.

Now everything is working perfectly.

Thanks again.