I've got a little shader effect - just a sine wave controlling vertex scale so far - and I've got a
freq uniform controlling it. I'm using a tween to control this in gdscript.
The obj starts at
freq zero (nothing happening), then tweens to
freq one. When it's done it fires a signal and tweens back from
freq one to zero:
Here's the tween subroutine where I send in the start and stop values:
func run_tween(a, b):
var t = $Tween
mat, "shader_param/freq", a, b, 1,
Here's signal method:
if not odd_even:
odd_even = not odd_even
Obviously I have the
odd_even bool there to go back and forth.
Except the frequency is visibly speeding up every time you run it. Same duration, quicker sine wave. It even happens when you lerp without easing.
I'm not changing any other values. Am I missing something obvious here?