“Multiple” particle textures with 1 draw call

The idea came from https://www.youtube.com/watch?v=vuLf6yE406c which was sent from my colleague that using the “texture sheet animation” can let unity particle system uses an atlas as texture. That means a particle system with different “textures” can use 1 material thus 1 draw call.

20150102_02

In my case, I want to increase the variety of the falling leaves. My texture atlas is like following and I defined the grid like this:

20150102_01     20150102_04

 

To let the emitter randomize which “leaf” to emit, I input the id range to “Texture Sheet Animation”:

20150102_03

The emitter now emits “different textures”! Now I don’t have to duplicate emitters to create the variety.

 

 

20150102_05

2 thoughts on ““Multiple” particle textures with 1 draw call

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s