Download

Variable frame Lengths in a flipbook animation. Would this be possible in a shader?

I want certain frames in my UV animated flipbook texture to stay on screen for longer or shorter amounts of time than other frames.
Does anyone have any ideas how this could be achieved?

At first I could store the start time of each flipbook frame in a separate texture. And offset the flip-books UVs by this start time. However this idea is flawed, because the texture containing the frame start times also needs to be to be animated, in order to get the correct frame start time. And (Ironically) the frame start time frames would also need to have variable frame-lengths.

Perhaps I am could do something like this.
2020-08-23 20_02_25-AnimationTesting_02.png](http://filedata/fetch?id=1804115&d=1598209377)
I get an error in the shader graph, however I am wondering, would this be possible to do in HLSL?

This response is short but… Try using a float curve asset with flat keyframes.