I want to add a emitter ID to my particles, so that my custom sprite shader is able to identify particles from different emitters and draw them accordingly in different sizes and colors.
I already did something similar with a dynamic buffer emitter, but I can’t get it to work with the kinect emitter. Does the kinect emitter work in a different way? Did I miss something?
why does external data has to come through a dynamic buffer, and can’t be set through a simple int inlet within the shader? I throught dynamic buffers are just good for moving data between different shaders, so when there is a lot of data which I do not want to readback?
sry I did not explain it well. initializing a variable (like uint eid= <string uiname=“Emitter ID”;> = 0;) and then writing its value to the particle (p.id = eid;) did not work. just by using a dynamicbuffer and writing its value I got it working.
thx for looking into it. now my example does suprisingly work. with the same code that did not work before! I swear I sat there for 4 hours straight, trying to figure it out and then uploaded it. really strange.