The way I understand it, Time->Sine gives me a value of -1 to 1 over a second. I can then input this as my X to move back and forth between my graph’s -1 to 1 values.
I then use a clamp to cut out everything below 0 as I only want the positive output.
However, I don’t get the result I expect. I see the big bounce, but the smaller one never appears, so something is amiss here.
Interestingly, when I encountered this and was trying to troubleshoot the issue I discovered that if you use the HLSL pow() function inside of a custom node… it works correctly. I still have no idea why this is the case. Here’s your function with custom pow()'s instead of power nodes:
While I do not have much experience with custom nodes and HLSL, I was able to get it to work.
Thanks for also showing me the PlotFunctionOnGraph node, which I’ve never seen before.
On a bit of a side tangent, how would you implement it if you want your graph to go from -1 to 1 repeatedly, without also going from 1 to -1, as you get with sine over time.