Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Audio Data as Input?

Discussion in 'Shader Graph' started by mmarcati, May 4, 2019.

  1. mmarcati

    mmarcati

    Joined:
    Apr 9, 2019
    Posts:
    1
    Hello,

    Is it possible to use audio data (such as loudness) as an input in Shader Graph?
    What I'd like to do is have the material react to sound (such as pulsate along with a song being played).
    Thanks!
     
  2. Arycama

    Arycama

    Joined:
    May 25, 2014
    Posts:
    182
    You can make an Input such as _AudioVolume, connect it to your shader graph, and set it manually from script using material.SetFloat("_AudioVolume", volume);
     
  3. Tapps-VR

    Tapps-VR

    Joined:
    Mar 10, 2017
    Posts:
    5
    Awesome, my question sounds silly now :)
    Thanks for the help, @Arycama !
     
    Arycama likes this.
  4. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
  5. Vegaplanet33

    Vegaplanet33

    Joined:
    Jan 26, 2019
    Posts:
    14
    I opened the LaspVfx example now but I have no idea how it with sound files works.
    Could you help me?
    Thanks.
     
    Gasimo, JUNG-ZEN and rthom like this.