Waveform fixes

- Due to a floating point division error not all the bars on the waveform were
  being drawn.
- Fix ratio in the fragment shader
This commit is contained in:
Thomas Wilshaw
2020-05-05 11:29:15 +01:00
parent 921a5f357e
commit 1e81969fca
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ void main(void) {
float waveform_x = (ove_texcoord.x - waveform_uv.x) / waveform_scale;
float waveform_y = (ove_texcoord.y - waveform_uv.y) / waveform_scale;
for (int i = 0; i < waveform_dims.y; i++) {
ratio = float(i) / float(waveform_dims.y);
ratio = float(i) / float(waveform_dims.y - 1);
cur_col = texture(
ove_maintex,
vec2(waveform_x, ratio)