- Home /
VFX Graph Vector Array Input
I'd like to create a particle system with the Visual Effects Graph which is basically an OcTree viewer. So the particles will remain completely stationary and the input will be an array of vectors. Is this possible and how would I go about implementing this?
Thank you for your time.
Answer by andrew-lukasik · Jun 02, 2021 at 02:54 PM
Dos:
Create a
TextureFormat.RGBAHalf
orTextureFormat.RGBAFloat
texture of appropriate sizeFill this texture with your vector array values
Call
texture.Apply()
to send the dataCall
m_visualEffect.SetTexture( "my vectors" , texture );
to bind itSample this texture inside your graph and be merry.
Destroy
texture
when scene unloads so it won't leak.
Don'ts:
do not use
Color32
as it will trim and compress your valuesdo not use
TextureFormat.RGBA32
orTextureFormat.RGB24
as those will clamp your values
Your answer
Follow this Question
Related Questions
Array of Vectors as Particle Input for Visual Effects Graph Unity 0 Answers
How i use mesh collider with vfx graph? 1 Answer
Android default VFX Graph vertical lines issue 0 Answers
Particle-system spawns like creating a "glowworm"... 1 Answer
VFX Graph particles flickering in Alpha Blend Mode 4 Answers