Skip to content

CVR Audio Material Parser

Feeds spectrum or output data from an AudioSource into shader material properties. Useful for building objects that react to music or video player audio.

When checked, uses the two Audio Sources defined in Source Audio L and Source Audio R. Otherwise the single Source Audio is used.

Audio Source the data comes from.

Left Audio Source channel.

Right Audio Source channel.

Method used to pull data from the source. Output format depends on the method chosen.

  • Output Data Uses GetOutputData.
  • Spectrum Data Uses GetSpectrumData.

Material used to process the data. The shader receives the values via the names defined below.

Size of the array sent to the shader.

Names of the individual float-array parameters exposed to the shader.

Current volume of the audio source (float).

Distance from the player to the audio source (float).

Pitch of the audio source (float).

Doppler value of the audio source (float).

Spatial blend of the audio source (float).

The component streams fragmentSize samples per buffer into each of the four L/R shader parameters, giving the shader fragmentSize * 4 consecutive samples per channel. Any parameter name left blank is skipped.

Distance is measured from the active player camera (the character controller’s rotation pivot) to the audio source transform.

  • CVR-GameFiles/ABI.CCK.Components/CVRAudioMaterialParser.cs