Reputation: 11
I am super new to shadertoy and coding in general and am trying to build a 2 body physics simulation in shadertoy and am trying to use verlet integration to simulate that. I have a function that calculates the new position from the previous ones but I am not managing to somehow make it update every frame or short amount of time. I want to call the function but it either seems to call it a bunch in the first frame or call it once on the first frame just not call it at all.
I have tried to add Iframe and iTime as parameters of the function in all kinds of places in the function to hopefully make it call it on some dependance to no avail. the calculations itself happen in discrete steps so I can't have it actually depend on iTime. I have seen some people use the iChannel(10) for time or something but I don't really get how it works
Upvotes: 1
Views: 46