© Peter Späth 2018
Peter SpäthAdvanced Audio Visualization Using ThMADhttps://doi.org/10.1007/978-1-4842-3504-1_6

6. Stories II

Peter Späth1 
(1)
Leipzig, Germany
 

The stories in this chapter are examples of using only a few modules; instead, a lot of functionality is in the shader code. See Chapter 4 for an introduction to shaders.

Color Gradient Mapping

You can take an interesting picture uploaded as a texture to the graphics hardware , convert its colors to grayscale values, and map those to a color gradient that gets calculated in the shader. This mapping gets controlled from the outside using sound and uniform variables.

Since the vertex shader doesn’t know anything about pixel-wise colors, you will provide just the no-op vertex shader, move the ...

Get Advanced Audio Visualization Using ThMAD: Creating Amazing Graphics with Open Source Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.