MCPcopy Create free account
hub / github.com/NMWplays/Glowify / getDominantColor

Function getDominantColor

theme.js:10–38  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

8 varying vec2 v_texCoord;
9 void main() {
10 gl_Position = vec4(a_position, 0.0, 1.0);
11 v_texCoord = a_texCoord;
12 }
13`;
14 var KAWASE_BLUR_SHADER = `
15 precision highp float;
16 uniform sampler2D u_texture;
17 uniform vec2 u_resolution;
18 uniform float u_offset;
19 varying vec2 v_texCoord;
20
21 void main() {
22 highp vec2 texelSize = 1.0 / u_resolution;
23 highp vec4 color = vec4(0.0);
24
25 color += texture2D(u_texture, v_texCoord + vec2(-u_offset, -u_offset) * texelSize);
26 color += texture2D(u_texture, v_texCoord + vec2(u_offset, -u_offset) * texelSize);
27 color += texture2D(u_texture, v_texCoord + vec2(-u_offset, u_offset) * texelSize);
28 color += texture2D(u_texture, v_texCoord + vec2(u_offset, u_offset) * texelSize);
29
30 gl_FragColor = color * 0.25;
31 }
32`;
33 var BLEND_SHADER = `
34 precision highp float;
35 uniform sampler2D u_texture1;
36 uniform sampler2D u_texture2;
37 uniform float u_blend;
38 varying vec2 v_texCoord;
39
40 void main() {
41 vec4 color1 = texture2D(u_texture1, v_texCoord);

Callers 1

applyAccentFunction · 0.85

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected