Audio Reactive Material Renderer
The Audio Reactive Material Renderer can be used to render audio reactive materials to one or more Render Textures each frame.
The Audio Reactive Material Renderer receives the audio analysis data (beat detection and energy levels) from the application, processes it using the active Program Material Renderer Configuration and uses the results to update the properties of the audio reactive material referenced in the configuration. Afterwards that material is rendered to all of the assigned Render Textures, which in turn can be used as textures in other materials.
As an example, this method is used to render the audio reactive visuals displayed on the LED wall behind the DJ booth in the Club and SDK example environments. The Audio Reactive Material Renderer can be tested in the Unity Editor using the Audio Reaction Emulator.
To be able to switch between different materials when the music’s Energy Level changes, Program Material Renderer Configuration assets can be used to link a material to a one or more corresponding Energy Levels.
Please note that the Program Material Renderer Configuration assets added to the Audio Reactive Material Renderer need to cover all of the existing Energy Levels. An error message will be displayed in the inspector if this is not the case.
Component Properties
- Change Program On Energy Drop: Change to a new program when a sudden drop in energy is detected? When disabled, programs will only change when the Energy Level changes.
- Render Textures: List of Render Texture assets to render the materials into each frame.
- Material Renderer Program Configurations: List of Program Material Renderer Configuration assets that control this Renderer.