Wav Texture by keijiro - 138

AudioShaders & EffectsGames & Projects

A Unity example showing how to bake a waveform of an audio clip into a texture and use it in a shader.

Unity 5.5.1f1Unknown LicenseUpdated 4 years agoCreated on January 19th, 2017
Go to source

WavTexture

A Unity example showing how to bake a waveform of an audio clip into a texture and use it in a shader.

gif

Why should I bake a waveform into a texture?

  • Pros: You can render a waveform with almost zero cost on the CPU side. It never waste heap/GC memory.
  • Cons: You have to bake a waveform at build time. It’s not very useful for interactive contents.

In other words, this technique is only useful when you’re creating something not interactive, and you prefer torturing GPU rather than sacrificing the precious CPU time and memory.

Acknowledgement

The test song “A Himitsu - Easier to Fade (feat. Madi Larson)” was created by Argofox. It’s shared under a Creative Commons Attribution License. See author’s Soundcloud page for further details.

https://soundcloud.com/argofox/a-himitsu-easier-to-fade

Show all projects by keijiro