I want to change textures of the atlas map assigned from the particle ID. Although there is a "Switch" node in VFX graph, I think that it returns only RGBA value. Is there a good node to output textures for each input value? How do I create custom nodes in VFX graph? ----------------------- Unity: 2019.3.0f6 Visual Effect Graph: 7.1.9
Hi @tomBuzz , I'm afraid using different textures per particle is currently not supported. You could try creating a VFX shader graph shader and expose multiple textures and switch between them within the shader itself. The VFX Shader Graph integration is still experimental, but you can enable it in Preferences / Visual Effects / Experimental Operators/Blocks. As another workaround, you can also have multiple outputs from the same effect. In your example you can duplicate the quad output a couple of times, connect all instances to Update, and have each quad output render with a different texture. Then you can add a Set Alive block in each output and control the True/False value via your switch. (This is not the most optimized workaround as you'll still be paying the cost for the culled particles.)
Another way to do it would be to pack all your textures in a single flipbook texture and then use the texIndex attribute to choose which texture to use per particle