Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
scenefx/render/fx_renderer/shaders/quad_grad.frag (558B)
1 #define LEN %d
2
3 #ifdef GL_FRAGMENT_PRECISION_HIGH
4 precision highp float;
5 #else
6 precision mediump float;
7 #endif
8
9 varying vec4 v_color;
10 varying vec2 v_texcoord;
11
12 uniform vec4 colors[LEN];
13 uniform vec2 size;
14 uniform float degree;
15 uniform vec2 grad_box;
16 uniform vec2 origin;
17 uniform bool linear;
18 uniform bool blend;
19 uniform int count;
20
21 vec4 gradient(vec4 colors[LEN], int count, vec2 size, vec2 grad_box, vec2 origin, float degree, bool linear, bool blend);
22
23 void main(){
24 gl_FragColor = gradient(colors, count, size, grad_box, origin, degree, linear, blend);
25 }