Waveforms

From Shader Forge Wiki
Jump to: navigation, search

When animating things over time, you often want to have a waveform to define how it should animate. A common method is to use the sine node to get a smooth pulsating wave, to animate lights or making things sway back and forth.


In the image to the right, you can see four waveforms:

  • Sine yields a very natural motion, but is a bit expensive. You can smooth triangle waves to get a near-identical wave
  • Sawtooth is a linear ramp up, with a sharp drop
  • Triangle is a linear back-and-forth wave
  • Square gives you a wave that alternates between 0 and 1, without any intermediate values
From top to bottom: Sine, Sawtooth, Triangle, Square
From top to bottom: Sine, Sawtooth, Triangle, Square