Genesis Digital Audio Workstation

Gradients and Samples

2015 May 11

The Resources Tree now has a scroll bar and reads samples from your configured sample directories.

I also made it a lot easier in my codebase to make a fancy gradient background. The gradient is computed in a shader on the GPU:

Vertex Shader

#version 150 core

in vec3 VertexPosition;
out float MixAmt;

uniform mat4 MVP;

void main(void) {
    MixAmt = clamp(0, VertexPosition.y, 1);
    gl_Position = MVP * vec4(VertexPosition, 1.0);

Fragment Shader

#version 150 core

in float MixAmt;
out vec4 FragColor;

uniform vec4 ColorTop;
uniform vec4 ColorBottom;

void main(void) {
    FragColor = ColorBottom * MixAmt + ColorTop * (1 - MixAmt);

Previous Post: Dock Demo

Next Post: Playback

Genesis on GitHub