Compute velocity in GLSL pop

I am trying to compute the velocity of a point in POPs in GLSL but I can’t wrap my head on how to do that.
What I tried so far :
Use a cache and feed the PrevP into GLSL and then write it out as PrevP in a feedback chain but it seems like I cannot output a custom vector such as PrevP
I attached a tox
VelocityComputeGLSL.tox (151.2 KB)

Here’s a simple example of how to calculate the velocity based on the current and last position. Using a cache POP and a GLSL POP

velocity.tox (1006 Bytes)

1 Like