blob: 53da3cfe2c4b5f9e4bcbebcde5dbb5324356461a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#version 450
// Pulses running from the modulator to the carrier, soft at the edges.
layout(location = 0) in vec4 color;
layout(location = 1) in vec2 along;
layout(location = 2) flat in float time;
layout(location = 0) out vec4 out_color;
void main() {
float pulse = 0.5 + 0.5 * sin(along.x * 0.25 - time * 9.0);
float edge = 1.0 - along.y * along.y;
out_color = color * edge * (0.3 + 0.7 * pulse * pulse);
}
|