Hi there,

I’m trying to map green, yellow and red to their respective decibel values for a simple meter and was hoping someone could confirm if I’m doing things correctly, because it looks a little weird to me.

As you can see, the below uses green for dB’s less than -20, yellow for less than -9 and red from -9 and over.

st.x is simply the value of the normalized horizontal pixel value where the left side of the window is 0., right side is 1.

Many thanks for any help.

The below is written in glsl:

```
float dcb = log(st.x) * 20.0;
return dcb < -20. ? green : dcb < -9. ? yellow : red;
```

The results: