Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ParticleSystemVertexStreams

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

All possible particle system vertex shader inputs.

Variables

PositionThe world space position of each particle.
NormalThe normal of each particle.
TangentTangent vectors for normal mapping.
ColorThe color of each particle.
UVThe texture coordinates of each particle.
UV2BlendAndFrameWith the Texture Sheet Animation module enabled, this contains the UVs for the second texture frame, the blend factor for each particle, and the raw frame, allowing for blending of frames.
CenterAndVertexIDThe center position of each particle, with the vertex ID of each particle, from 0-3, stored in the w component.
SizeThe size of each particle.
RotationThe rotation of each particle.
VelocityThe 3D velocity of each particle.
LifetimeAlive time as a 0-1 value in the X component, and Total Lifetime in the Y component. To get the current particle age, simply multiply X by Y.
Custom1The first stream of custom data, supplied from script.
Custom2The second stream of custom data, supplied from script.
Random4 random numbers. The first 3 are deterministic and assigned once when each particle is born, but the 4th value will change during the lifetime of the particle.
NoneA mask with no vertex streams enabled.
AllA mask with all vertex streams enabled.