Wiki: Bragging with math at parties: Visualizing your music with shaders and math/ Sagie Levy Genadi Iosad

For agents: Markdown version · Wiki index · Explore

Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

Summary

This talk demonstrates how to create real-time visualizers and animations for music using math and shaders. The speakers explain the fundamentals of GPU programming, signed distance functions, and how to map audio frequency data to visual elements. Through live coding, they show how simple mathematical equations can generate complex and captivating graphical experiences.

Key points

  • 4:37 The speaker introduces the render pipeline and explains that fragment shaders execute a function for every pixel coordinate to determine its color.
  • 7:50 Color channels in GLSL shaders range from zero to one and represent red, green, blue, and alpha values.
  • 11:09 Signed distance functions calculate the distance from any point to the border of a shape, enabling precise geometric rendering.
  • 14:20 Time uniforms provided by the game engine allow developers to drive animations by dynamically altering shader parameters.
  • 16:31 Computer audio is fundamentally an analog waveform sampled into discrete sequences of numbers that can be processed in shaders.
  • 21:16 Applying Fourier transform concepts allows developers to break down audio into frequency histograms and map different frequencies to visual components.

Takeaways

  • Use signed distance functions to mathematically define and render shapes in fragment shaders.
  • Leverage the GPU’s parallel processing capabilities by writing lightweight GLSL code for real-time 60fps animations.
  • Map audio waveforms and frequency bands to visual properties to create music-reactive graphics.

Questions this talk answers

  • How can I write a fragment shader to draw basic shapes using UV coordinates?
  • What is a signed distance function and how is it used in graphics programming?
  • How do I connect audio frequency data to shader parameters for music visualization?

Technologies

GLSL, Unity

Tags

audio processing, creative coding, frontend, graphics, math, shaders