gl-transitions 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/compatibility.json +400 -0
- package/gl-transitions.js +1 -1
- package/gl-transitions.json +1 -1
- package/glsl3/Accordion.glsl +85 -0
- package/glsl3/Ascii.glsl +124 -0
- package/glsl3/BlockCover.glsl +87 -0
- package/glsl3/BloomDissolve.glsl +110 -0
- package/glsl3/BokehDissolve.glsl +123 -0
- package/glsl3/BrushWipe.glsl +100 -0
- package/glsl3/CameraShake.glsl +98 -0
- package/glsl3/CardSwipe.glsl +81 -0
- package/glsl3/CurvedWipe.glsl +52 -0
- package/glsl3/Disintegrate.glsl +112 -0
- package/glsl3/FilmDissolve.glsl +49 -0
- package/glsl3/FilmStrip.glsl +105 -0
- package/glsl3/FlameWipe.glsl +154 -0
- package/glsl3/GooeyWipe.glsl +97 -0
- package/glsl3/InkBleed.glsl +96 -0
- package/glsl3/LensFlare.glsl +125 -0
- package/glsl3/LightRays.glsl +106 -0
- package/glsl3/LightWipe.glsl +89 -0
- package/glsl3/PhotoDevelop.glsl +59 -0
- package/glsl3/PlusWipe.glsl +38 -0
- package/glsl3/PopIn.glsl +57 -0
- package/glsl3/SmokeDissolve.glsl +102 -0
- package/glsl3/SplatterWipe.glsl +154 -0
- package/glsl3/StretchSlide.glsl +62 -0
- package/glsl3/WedgeWipe.glsl +35 -0
- package/index.js +1 -1
- package/layouts.json +945 -40
- package/llms-full.txt +705 -304
- package/llms.txt +185 -160
- package/msl/Accordion.metal +421 -0
- package/msl/Ascii.metal +567 -0
- package/msl/BlockCover.metal +403 -0
- package/msl/BloomDissolve.metal +416 -0
- package/msl/BokehDissolve.metal +447 -0
- package/msl/BrushWipe.metal +488 -0
- package/msl/CameraShake.metal +393 -0
- package/msl/CardSwipe.metal +342 -0
- package/msl/CurvedWipe.metal +229 -0
- package/msl/Disintegrate.metal +468 -0
- package/msl/FilmDissolve.metal +199 -0
- package/msl/FilmStrip.metal +429 -0
- package/msl/FlameWipe.metal +575 -0
- package/msl/GooeyWipe.metal +398 -0
- package/msl/InkBleed.metal +409 -0
- package/msl/LensFlare.metal +455 -0
- package/msl/LightRays.metal +427 -0
- package/msl/LightWipe.metal +321 -0
- package/msl/PhotoDevelop.metal +245 -0
- package/msl/PlusWipe.metal +199 -0
- package/msl/PopIn.metal +245 -0
- package/msl/SmokeDissolve.metal +400 -0
- package/msl/SplatterWipe.metal +677 -0
- package/msl/StretchSlide.metal +243 -0
- package/msl/WedgeWipe.metal +154 -0
- package/package.json +1 -1
- package/skills/gl-transitions/references/catalog.md +100 -36
- package/sksl/Accordion.sksl +94 -0
- package/sksl/Ascii.sksl +131 -0
- package/sksl/BlockCover.sksl +96 -0
- package/sksl/BloomDissolve.sksl +119 -0
- package/sksl/BokehDissolve.sksl +132 -0
- package/sksl/BrushWipe.sksl +109 -0
- package/sksl/CameraShake.sksl +108 -0
- package/sksl/CardSwipe.sksl +93 -0
- package/sksl/CurvedWipe.sksl +64 -0
- package/sksl/Disintegrate.sksl +117 -0
- package/sksl/FilmDissolve.sksl +60 -0
- package/sksl/FilmStrip.sksl +114 -0
- package/sksl/FlameWipe.sksl +162 -0
- package/sksl/GooeyWipe.sksl +109 -0
- package/sksl/InkBleed.sksl +109 -0
- package/sksl/LensFlare.sksl +135 -0
- package/sksl/LightRays.sksl +115 -0
- package/sksl/LightWipe.sksl +97 -0
- package/sksl/PhotoDevelop.sksl +72 -0
- package/sksl/PlusWipe.sksl +50 -0
- package/sksl/PopIn.sksl +69 -0
- package/sksl/SmokeDissolve.sksl +115 -0
- package/sksl/SplatterWipe.sksl +161 -0
- package/sksl/StretchSlide.sksl +74 -0
- package/sksl/WedgeWipe.sksl +46 -0
- package/sksl/index.js +1 -1
- package/transitions/Accordion.glsl +84 -0
- package/transitions/Ascii.glsl +123 -0
- package/transitions/BlockCover.glsl +86 -0
- package/transitions/BloomDissolve.glsl +109 -0
- package/transitions/BokehDissolve.glsl +122 -0
- package/transitions/BrushWipe.glsl +99 -0
- package/transitions/CameraShake.glsl +97 -0
- package/transitions/CardSwipe.glsl +80 -0
- package/transitions/CurvedWipe.glsl +51 -0
- package/transitions/Disintegrate.glsl +111 -0
- package/transitions/FilmDissolve.glsl +48 -0
- package/transitions/FilmStrip.glsl +104 -0
- package/transitions/FlameWipe.glsl +153 -0
- package/transitions/GooeyWipe.glsl +96 -0
- package/transitions/InkBleed.glsl +95 -0
- package/transitions/LensFlare.glsl +124 -0
- package/transitions/LightRays.glsl +105 -0
- package/transitions/LightWipe.glsl +88 -0
- package/transitions/PhotoDevelop.glsl +58 -0
- package/transitions/PlusWipe.glsl +37 -0
- package/transitions/PopIn.glsl +56 -0
- package/transitions/SmokeDissolve.glsl +101 -0
- package/transitions/SplatterWipe.glsl +153 -0
- package/transitions/StretchSlide.glsl +61 -0
- package/transitions/WedgeWipe.glsl +34 -0
- package/wgsl/Accordion.wgsl +376 -0
- package/wgsl/Ascii.wgsl +519 -0
- package/wgsl/BlockCover.wgsl +352 -0
- package/wgsl/BloomDissolve.wgsl +372 -0
- package/wgsl/BokehDissolve.wgsl +409 -0
- package/wgsl/BrushWipe.wgsl +443 -0
- package/wgsl/CameraShake.wgsl +348 -0
- package/wgsl/CardSwipe.wgsl +308 -0
- package/wgsl/CurvedWipe.wgsl +198 -0
- package/wgsl/Disintegrate.wgsl +426 -0
- package/wgsl/FilmDissolve.wgsl +169 -0
- package/wgsl/FilmStrip.wgsl +381 -0
- package/wgsl/FlameWipe.wgsl +531 -0
- package/wgsl/GooeyWipe.wgsl +353 -0
- package/wgsl/InkBleed.wgsl +366 -0
- package/wgsl/LensFlare.wgsl +406 -0
- package/wgsl/LightRays.wgsl +380 -0
- package/wgsl/LightWipe.wgsl +277 -0
- package/wgsl/PhotoDevelop.wgsl +213 -0
- package/wgsl/PlusWipe.wgsl +165 -0
- package/wgsl/PopIn.wgsl +213 -0
- package/wgsl/SmokeDissolve.wgsl +363 -0
- package/wgsl/SplatterWipe.wgsl +613 -0
- package/wgsl/StretchSlide.wgsl +213 -0
- package/wgsl/WedgeWipe.wgsl +126 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// LensFlare — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/LensFlare.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: A bright light sweeps across the frame and flares the lens: a long thin horizontal streak, a glowing core and a trail of colored ghost reflections; at its peak the incoming image spreads out from the light under its glare
|
|
5
|
+
|
|
6
|
+
uniform shader _from;
|
|
7
|
+
uniform shader _to;
|
|
8
|
+
uniform float2 _resolution;
|
|
9
|
+
uniform float progress;
|
|
10
|
+
uniform float ratio;
|
|
11
|
+
|
|
12
|
+
vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
13
|
+
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
|
+
|
|
15
|
+
uniform float angle;
|
|
16
|
+
|
|
17
|
+
uniform float height;
|
|
18
|
+
|
|
19
|
+
uniform float intensity;
|
|
20
|
+
|
|
21
|
+
uniform vec3 color;
|
|
22
|
+
|
|
23
|
+
const int BLOOM_TAPS = 12;
|
|
24
|
+
const int GHOSTS = 6;
|
|
25
|
+
|
|
26
|
+
vec2 mirror(vec2 v) {
|
|
27
|
+
return 1.0 - abs(1.0 - mod(v, 2.0));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
vec4 premultiplied(vec4 c) {
|
|
31
|
+
return vec4(c.rgb * c.a, c.a);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
vec4 frame(vec2 st, float m) {
|
|
35
|
+
if (m <= 0.0) return premultiplied(getFromColor(st));
|
|
36
|
+
if (m >= 1.0) return premultiplied(getToColor(st));
|
|
37
|
+
return mix(premultiplied(getFromColor(st)), premultiplied(getToColor(st)), m);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
vec3 highlight(vec4 c) {
|
|
41
|
+
float lum = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
|
|
42
|
+
return c.rgb * smoothstep(0.55, 0.95, lum);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
vec4 transition(vec2 uv) {
|
|
46
|
+
float p = progress;
|
|
47
|
+
if (p <= 0.0) return getFromColor(uv);
|
|
48
|
+
if (p >= 1.0) return getToColor(uv);
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
float env = 4.0 * p * (1.0 - p);
|
|
52
|
+
float peak = pow(env, 24.0);
|
|
53
|
+
|
|
54
|
+
vec2 aspect = vec2(ratio, 1.0);
|
|
55
|
+
vec2 q = (uv - 0.5) * aspect;
|
|
56
|
+
float r = radians(angle);
|
|
57
|
+
vec2 dir = vec2(cos(r), -sin(r));
|
|
58
|
+
vec2 normal = vec2(-dir.y, dir.x);
|
|
59
|
+
|
|
60
|
+
float t = p - 0.5;
|
|
61
|
+
float travel = 0.5 * (abs(dir.x) * ratio + abs(dir.y)) + 0.3;
|
|
62
|
+
float along = travel * (2.0 * t) * (0.55 + 1.8 * t * t);
|
|
63
|
+
vec2 src = dir * along + normal * height;
|
|
64
|
+
|
|
65
|
+
vec2 d = q - src;
|
|
66
|
+
float dist = length(d);
|
|
67
|
+
float k = intensity * env;
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
float cut = mix(0.2, 0.06, clamp(intensity, 0.0, 1.0));
|
|
72
|
+
float s = clamp((p - 0.5 + cut) / (2.0 * cut), 0.0, 1.0);
|
|
73
|
+
float soft = 0.3;
|
|
74
|
+
float reach = 0.5 * length(aspect) + length(src) + soft;
|
|
75
|
+
float front = s * (reach + soft);
|
|
76
|
+
float m = smoothstep(front, front - soft, dist);
|
|
77
|
+
vec4 base = frame(uv, m);
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
float ax = abs(d.x);
|
|
81
|
+
float ay = abs(d.y);
|
|
82
|
+
float thin = exp(-ay * 140.0) * exp(-ax * 0.7);
|
|
83
|
+
float wide = exp(-ay * 30.0) * exp(-ax * 1.6);
|
|
84
|
+
vec3 tint = color;
|
|
85
|
+
vec3 streak = (thin * mix(vec3(1.0), tint, smoothstep(0.0, 0.3, ax)) + 0.5 * wide * tint) * 3.0;
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
vec3 core = vec3(1.0, 0.97, 0.92) * exp(-dist * dist * 600.0) * 3.0 + mix(vec3(1.0), tint, 0.5) * exp(-dist * 7.0) * 0.6;
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
vec3 ghosts = vec3(0.0);
|
|
92
|
+
for (int i = 0; i < GHOSTS; i++) {
|
|
93
|
+
float fi = float(i);
|
|
94
|
+
float f = -0.45 + 0.42 * fi + 0.08 * sin(fi * 2.3);
|
|
95
|
+
vec2 g = -src * f;
|
|
96
|
+
float size = 0.025 + 0.06 * fract(fi * 0.618 + 0.2);
|
|
97
|
+
float gd = length(q - g) / size;
|
|
98
|
+
|
|
99
|
+
float disc = smoothstep(1.0, 0.8, gd) * (0.35 + 0.65 * smoothstep(0.4, 0.95, gd));
|
|
100
|
+
vec3 hue = mix(tint, vec3(1.0, 0.65, 0.35), fract(fi * 0.53));
|
|
101
|
+
hue = mix(hue, vec3(0.5, 1.0, 0.6), step(4.5, fi) * 0.6);
|
|
102
|
+
ghosts += disc * hue * 0.45;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
vec3 bloom = vec3(0.0);
|
|
107
|
+
if (peak > 1e-3) {
|
|
108
|
+
float radius = 0.06 * env;
|
|
109
|
+
for (int i = 0; i < BLOOM_TAPS; i++) {
|
|
110
|
+
float fi = float(i);
|
|
111
|
+
float a = fi * 2.39996;
|
|
112
|
+
float rr = radius * sqrt((fi + 0.5) / float(BLOOM_TAPS));
|
|
113
|
+
vec2 o = vec2(cos(a), sin(a)) * rr / aspect;
|
|
114
|
+
bloom += highlight(frame(mirror(uv + o), m));
|
|
115
|
+
}
|
|
116
|
+
bloom /= float(BLOOM_TAPS);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
vec3 glare = mix(vec3(1.0), tint, 0.5) * peak * (0.45 + 2.2 * exp(-dist * 3.0));
|
|
121
|
+
|
|
122
|
+
vec3 light = k * (streak + core + ghosts) + intensity * (bloom * 2.5 * peak + glare);
|
|
123
|
+
light = 1.0 - exp(-light);
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
vec3 c = base.rgb + light * base.a - base.rgb * light;
|
|
127
|
+
if (base.a <= 0.0) return vec4(0.0);
|
|
128
|
+
return vec4(clamp(c / base.a, 0.0, 1.0), base.a);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
half4 main(float2 _coord) {
|
|
132
|
+
vec2 _uv = _coord / _resolution;
|
|
133
|
+
vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
|
|
134
|
+
return half4(_c.rgb * _c.a, _c.a);
|
|
135
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// LightRays — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/LightRays.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: Shafts of light burst from the highlights of the outgoing image and stream outward from a slowly drifting center; at their peak the incoming image takes over and its own rays shrink back into its highlights
|
|
5
|
+
|
|
6
|
+
uniform shader _from;
|
|
7
|
+
uniform shader _to;
|
|
8
|
+
uniform float2 _resolution;
|
|
9
|
+
uniform float progress;
|
|
10
|
+
uniform float ratio;
|
|
11
|
+
|
|
12
|
+
vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
13
|
+
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
|
+
|
|
15
|
+
uniform vec2 center;
|
|
16
|
+
|
|
17
|
+
uniform float drift;
|
|
18
|
+
|
|
19
|
+
uniform float reach;
|
|
20
|
+
|
|
21
|
+
uniform float threshold;
|
|
22
|
+
|
|
23
|
+
uniform float intensity;
|
|
24
|
+
|
|
25
|
+
uniform vec3 tint;
|
|
26
|
+
|
|
27
|
+
const int TAPS = 20;
|
|
28
|
+
|
|
29
|
+
const float SHAFTS = 23.0;
|
|
30
|
+
const float PI = 3.141592653589793;
|
|
31
|
+
|
|
32
|
+
float hash12(vec2 v) {
|
|
33
|
+
vec3 v3 = fract(vec3(v.xyx) * 0.1031);
|
|
34
|
+
v3 += dot(v3, v3.yzx + 33.33);
|
|
35
|
+
return fract((v3.x + v3.y) * v3.z);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
float shaftNoise(float t, float n, float seed) {
|
|
39
|
+
float x = t * n;
|
|
40
|
+
float i = floor(x);
|
|
41
|
+
float f = x - i;
|
|
42
|
+
float a = hash12(vec2(mod(i, n), seed));
|
|
43
|
+
float b = hash12(vec2(mod(i + 1.0, n), seed));
|
|
44
|
+
return mix(a, b, f * f * (3.0 - 2.0 * f));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
vec2 mirror(vec2 v) {
|
|
48
|
+
return 1.0 - abs(1.0 - mod(v, 2.0));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
vec3 glow(vec4 c, float knee) {
|
|
52
|
+
float lum = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
|
|
53
|
+
return c.rgb * c.a * smoothstep(knee, knee + 0.2, lum);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
vec3 light(vec2 st, float knee, float m) {
|
|
57
|
+
if (m <= 0.0) return glow(getFromColor(st), knee);
|
|
58
|
+
if (m >= 1.0) return glow(getToColor(st), knee);
|
|
59
|
+
return mix(glow(getFromColor(st), knee), glow(getToColor(st), knee), m);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
vec4 transition(vec2 uv) {
|
|
63
|
+
float p = progress;
|
|
64
|
+
|
|
65
|
+
float amount = p < 0.5 ? smoothstep(0.0, 0.5, p) : 1.0 - smoothstep(0.5, 1.0, p);
|
|
66
|
+
float peak = amount * amount * amount;
|
|
67
|
+
float m = smoothstep(0.46, 0.54, p);
|
|
68
|
+
vec4 fromColor = getFromColor(uv);
|
|
69
|
+
vec4 toColor = getToColor(uv);
|
|
70
|
+
if (amount <= 0.0) return m < 0.5 ? fromColor : toColor;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
vec2 origin = center + vec2(drift * (p - 0.5), 0.0);
|
|
74
|
+
float len = reach * amount;
|
|
75
|
+
|
|
76
|
+
float knee = mix(threshold, 0.75 * threshold, peak);
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
float jitter = hash12(floor(uv * vec2(ratio, 1.0) * 997.0));
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
vec3 rays = vec3(0.0);
|
|
83
|
+
float total = 0.0;
|
|
84
|
+
for (int i = 0; i < TAPS; i++) {
|
|
85
|
+
float s = (float(i) + jitter) / float(TAPS);
|
|
86
|
+
float w = exp(-2.0 * s);
|
|
87
|
+
|
|
88
|
+
vec3 hue = mix(vec3(1.0), tint, smoothstep(0.0, 0.6, s));
|
|
89
|
+
rays += w * hue * light(mirror(mix(uv, origin, s * len)), knee, m);
|
|
90
|
+
total += w;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
vec2 d = (uv - origin) * vec2(ratio, 1.0);
|
|
94
|
+
|
|
95
|
+
float turn = length(d) > 1e-6 ? atan(d.y, d.x) / (2.0 * PI) + 0.5 : 0.0;
|
|
96
|
+
float shafts = 0.6 * shaftNoise(fract(turn + 0.03 * p), SHAFTS, 1.0) + 0.4 * shaftNoise(fract(turn - 0.05 * p), 2.0 * SHAFTS + 1.0, 7.0);
|
|
97
|
+
|
|
98
|
+
rays *= mix(1.0, mix(0.2, 1.6, smoothstep(0.15, 0.85, shafts)), smoothstep(0.0, 0.3, length(d)));
|
|
99
|
+
rays *= intensity * amount * (1.0 + 3.0 * peak) / total;
|
|
100
|
+
|
|
101
|
+
rays = 0.9 * (1.0 - exp(-rays));
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
vec4 c = mix(vec4(fromColor.rgb * fromColor.a, fromColor.a), vec4(toColor.rgb * toColor.a, toColor.a), m);
|
|
106
|
+
if (c.a <= 0.0) return vec4(0.0);
|
|
107
|
+
vec3 base = min(c.rgb / c.a * (1.0 + 0.2 * peak), 1.0);
|
|
108
|
+
return vec4(base + rays - base * rays, c.a);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
half4 main(float2 _coord) {
|
|
112
|
+
vec2 _uv = _coord / _resolution;
|
|
113
|
+
vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
|
|
114
|
+
return half4(_c.rgb * _c.a, _c.a);
|
|
115
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// LightWipe — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/LightWipe.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: A band of intense light sweeps across the frame like a glint on glass, blooming the highlights of both images, and leaves the incoming image behind it
|
|
5
|
+
|
|
6
|
+
uniform shader _from;
|
|
7
|
+
uniform shader _to;
|
|
8
|
+
uniform float2 _resolution;
|
|
9
|
+
uniform float progress;
|
|
10
|
+
uniform float ratio;
|
|
11
|
+
|
|
12
|
+
vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
13
|
+
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
|
+
|
|
15
|
+
uniform vec2 direction;
|
|
16
|
+
|
|
17
|
+
uniform float width;
|
|
18
|
+
|
|
19
|
+
uniform float intensity;
|
|
20
|
+
|
|
21
|
+
uniform vec3 color;
|
|
22
|
+
|
|
23
|
+
const int TAPS = 12;
|
|
24
|
+
|
|
25
|
+
vec2 mirror(vec2 v) {
|
|
26
|
+
return 1.0 - abs(1.0 - mod(v, 2.0));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
float ease(float t) {
|
|
30
|
+
return 0.5 * (t + t * t * (3.0 - 2.0 * t));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
vec4 frame(vec2 st, float m) {
|
|
34
|
+
return mix(getFromColor(st), getToColor(st), m);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
vec3 highlight(vec4 c) {
|
|
38
|
+
float lum = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
|
|
39
|
+
return c.rgb * c.a * smoothstep(0.45, 1.0, lum);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
vec4 transition(vec2 uv) {
|
|
43
|
+
vec2 dir = length(direction) > 0.0 ? normalize(direction) : vec2(1.0, 0.0);
|
|
44
|
+
vec2 p = (uv - 0.5) * vec2(ratio, 1.0);
|
|
45
|
+
|
|
46
|
+
float e = 0.5 * (abs(dir.x) * ratio + abs(dir.y));
|
|
47
|
+
float w = max(width, 0.001);
|
|
48
|
+
float s = 0.35 * w;
|
|
49
|
+
|
|
50
|
+
float margin = s + 2.0 * w;
|
|
51
|
+
float pos = -e - margin + 2.0 * (e + margin) * ease(progress);
|
|
52
|
+
|
|
53
|
+
float d = dot(p, dir) - pos;
|
|
54
|
+
float m = 1.0 - smoothstep(-s, s, d);
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
float env = smoothstep(0.0, 0.2, progress) * (1.0 - smoothstep(0.8, 1.0, progress));
|
|
58
|
+
|
|
59
|
+
float core = exp(-d * d / (w * w));
|
|
60
|
+
float g = (d + 2.2 * w) / (0.3 * w);
|
|
61
|
+
float glint = 0.45 * exp(-g * g);
|
|
62
|
+
float halo = 0.35 * exp(-abs(d) / (5.0 * w));
|
|
63
|
+
float band = (core + glint + halo) * env * intensity;
|
|
64
|
+
|
|
65
|
+
float glow = (core + glint) * env * intensity;
|
|
66
|
+
|
|
67
|
+
vec4 c = frame(uv, m);
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
vec3 bloom = vec3(0.0);
|
|
71
|
+
|
|
72
|
+
float spread = min(3.0 * w, 0.12);
|
|
73
|
+
for (int i = 0; i < TAPS; i++) {
|
|
74
|
+
float t = (float(i) + 0.5) / float(TAPS) * 2.0 - 1.0;
|
|
75
|
+
vec2 st = mirror((p + dir * (t * spread)) / vec2(ratio, 1.0) + 0.5);
|
|
76
|
+
|
|
77
|
+
float dq = dot((st - 0.5) * vec2(ratio, 1.0), dir) - pos;
|
|
78
|
+
bloom += (1.0 - abs(t)) * highlight(frame(st, 1.0 - smoothstep(-s, s, dq)));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
bloom /= 0.5 * float(TAPS);
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
vec3 hue = mix(color, vec3(1.0), core * core);
|
|
85
|
+
float lum = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
|
|
86
|
+
|
|
87
|
+
vec3 light = hue * band * (0.3 + 0.9 * lum) + hue * bloom * glow * 4.0 + hue * core * env * intensity * 1.6;
|
|
88
|
+
vec3 rgb = 1.0 - (1.0 - c.rgb) * exp(-light);
|
|
89
|
+
|
|
90
|
+
return vec4(rgb, c.a);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
half4 main(float2 _coord) {
|
|
94
|
+
vec2 _uv = _coord / _resolution;
|
|
95
|
+
vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
|
|
96
|
+
return half4(_c.rgb * _c.a, _c.a);
|
|
97
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// PhotoDevelop — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/PhotoDevelop.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: The outgoing image washes out to a blank cream card, then the incoming image develops on it like an instant photo: shadows first, faint and tinted, then its contrast and colors come up and it settles
|
|
5
|
+
|
|
6
|
+
uniform shader _from;
|
|
7
|
+
uniform shader _to;
|
|
8
|
+
uniform float2 _resolution;
|
|
9
|
+
uniform float progress;
|
|
10
|
+
uniform float ratio;
|
|
11
|
+
|
|
12
|
+
vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
13
|
+
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
|
+
|
|
15
|
+
uniform vec4 card;
|
|
16
|
+
|
|
17
|
+
uniform float wash;
|
|
18
|
+
|
|
19
|
+
uniform float tint;
|
|
20
|
+
|
|
21
|
+
vec3 saturation(vec3 c, float s) {
|
|
22
|
+
float lum = dot(c, vec3(0.2126, 0.7152, 0.0722));
|
|
23
|
+
return mix(vec3(lum), c, s);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
vec4 transition(vec2 uv) {
|
|
27
|
+
vec4 a = getFromColor(uv);
|
|
28
|
+
vec4 b = getToColor(uv);
|
|
29
|
+
float p = progress;
|
|
30
|
+
if (p <= 0.0) return a;
|
|
31
|
+
if (p >= 1.0) return b;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
float split = mix(0.1, 0.7, clamp(wash, 0.0, 1.0));
|
|
35
|
+
float cardAlpha = card.a * mix(a.a, b.a, smoothstep(0.6 * split, split + 0.1, p));
|
|
36
|
+
vec3 cardColor = card.rgb * cardAlpha;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
float w = smoothstep(0.0, split, p);
|
|
40
|
+
float fromLum = dot(a.rgb, vec3(0.2126, 0.7152, 0.0722));
|
|
41
|
+
float wl = clamp(w * (1.0 + 0.5 * fromLum), 0.0, 1.0);
|
|
42
|
+
vec3 washed = mix(a.rgb, mix(vec3(fromLum), a.rgb, 0.4), w) * a.a;
|
|
43
|
+
vec3 outgoing = mix(washed, cardColor, wl);
|
|
44
|
+
float outAlpha = mix(a.a, cardAlpha, wl);
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
float x = clamp((p - split) / max(1.0 - split, 1e-3), 0.0, 1.0);
|
|
48
|
+
float d = 1.0 - pow(1.0 - x, 1.5);
|
|
49
|
+
float lum = dot(b.rgb, vec3(0.2126, 0.7152, 0.0722));
|
|
50
|
+
|
|
51
|
+
float dev = clamp((d - 0.45 * lum) / 0.55, 0.0, 1.0);
|
|
52
|
+
dev = dev * dev * (3.0 - 2.0 * dev);
|
|
53
|
+
|
|
54
|
+
float early = 1.0 - smoothstep(0.2, 0.95, d);
|
|
55
|
+
vec3 tinted = saturation(b.rgb, smoothstep(0.3, 1.0, d));
|
|
56
|
+
tinted = mix(vec3(0.6), tinted, mix(0.55, 1.0, d));
|
|
57
|
+
vec3 tone = mix(vec3(-0.2, 0.06, 0.1), vec3(0.12, -0.1, 0.06), smoothstep(0.15, 0.6, lum));
|
|
58
|
+
tinted += tone * tint * early;
|
|
59
|
+
vec3 incoming = mix(cardColor, clamp(tinted, 0.0, 1.0) * b.a, dev);
|
|
60
|
+
float inAlpha = mix(cardAlpha, b.a, dev);
|
|
61
|
+
|
|
62
|
+
vec3 color = p < split ? outgoing : incoming;
|
|
63
|
+
float alpha = p < split ? outAlpha : inAlpha;
|
|
64
|
+
if (alpha <= 0.0) return vec4(0.0);
|
|
65
|
+
return vec4(clamp(color / alpha, 0.0, 1.0), alpha);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
half4 main(float2 _coord) {
|
|
69
|
+
vec2 _uv = _coord / _resolution;
|
|
70
|
+
vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
|
|
71
|
+
return half4(_c.rgb * _c.a, _c.a);
|
|
72
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// PlusWipe — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/PlusWipe.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: A plus-shaped cross grows from the center and widens its arms until the incoming image fills the frame
|
|
5
|
+
|
|
6
|
+
uniform shader _from;
|
|
7
|
+
uniform shader _to;
|
|
8
|
+
uniform float2 _resolution;
|
|
9
|
+
uniform float progress;
|
|
10
|
+
uniform float ratio;
|
|
11
|
+
|
|
12
|
+
vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
13
|
+
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
|
+
|
|
15
|
+
uniform float smoothness;
|
|
16
|
+
|
|
17
|
+
uniform int reverse;
|
|
18
|
+
|
|
19
|
+
float boxDist (vec2 p, vec2 halfSize) {
|
|
20
|
+
vec2 d = abs(p) - halfSize;
|
|
21
|
+
return length(max(d, 0.0)) + min(max(d.x, d.y), 0.0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
float plus (vec2 q, float t, float s) {
|
|
25
|
+
vec2 frame = vec2(0.5 * ratio, 0.5);
|
|
26
|
+
float k = min(frame.x, frame.y);
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
vec2 halfWidth = k * t + (frame - k) * t * t;
|
|
30
|
+
|
|
31
|
+
float halfLength = 3.0 * max(frame.x, frame.y) * t;
|
|
32
|
+
float d = min(boxDist(q, vec2(halfLength, halfWidth.y)), boxDist(q, vec2(halfWidth.x, halfLength)));
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
return 1.0 - smoothstep(0.0, s, d + s * (1.0 - t));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
vec4 transition (vec2 uv) {
|
|
39
|
+
|
|
40
|
+
vec2 q = (uv - 0.5) * vec2(ratio, 1.0);
|
|
41
|
+
float s = max(smoothness, 0.001);
|
|
42
|
+
float m = (reverse != 0) ? 1.0 - plus(q, 1.0 - progress, s) : plus(q, progress, s);
|
|
43
|
+
return mix(getFromColor(uv), getToColor(uv), m);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
half4 main(float2 _coord) {
|
|
47
|
+
vec2 _uv = _coord / _resolution;
|
|
48
|
+
vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
|
|
49
|
+
return half4(_c.rgb * _c.a, _c.a);
|
|
50
|
+
}
|
package/sksl/PopIn.sksl
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// PopIn — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/PopIn.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: The incoming image pops in as a rounded card over the outgoing one, with an elastic overshoot: too big, a bit small, then it settles into the full frame as its corners square off
|
|
5
|
+
|
|
6
|
+
uniform shader _from;
|
|
7
|
+
uniform shader _to;
|
|
8
|
+
uniform float2 _resolution;
|
|
9
|
+
uniform float progress;
|
|
10
|
+
uniform float ratio;
|
|
11
|
+
|
|
12
|
+
vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
13
|
+
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
|
+
|
|
15
|
+
uniform vec2 center;
|
|
16
|
+
|
|
17
|
+
uniform float bounce;
|
|
18
|
+
|
|
19
|
+
uniform float corner;
|
|
20
|
+
|
|
21
|
+
uniform float shadow;
|
|
22
|
+
|
|
23
|
+
const float PI = 3.141592653589793;
|
|
24
|
+
|
|
25
|
+
float roundedBox(vec2 p, vec2 b, float r) {
|
|
26
|
+
vec2 q = abs(p) - b + r;
|
|
27
|
+
return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - r;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
vec4 transition(vec2 uv) {
|
|
31
|
+
float t = progress;
|
|
32
|
+
|
|
33
|
+
float easeOut = 1.0 - (1.0 - t) * (1.0 - t) * (1.0 - t);
|
|
34
|
+
float spring = 1.0 - exp(-1.5 * t) * cos(2.5 * PI * t) * (1.0 - t);
|
|
35
|
+
float s = mix(easeOut, spring, bounce);
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
vec2 asp = vec2(ratio, 1.0);
|
|
39
|
+
float side = min(ratio, 1.0);
|
|
40
|
+
vec2 cardCenter = center + (0.5 - center) * s;
|
|
41
|
+
vec2 halfSize = 0.5 * s * asp;
|
|
42
|
+
float r = corner * s * side * (1.0 - t);
|
|
43
|
+
float aa = 0.002;
|
|
44
|
+
|
|
45
|
+
float d = roundedBox((uv - cardCenter) * asp, halfSize, r) - aa;
|
|
46
|
+
float cover = clamp(0.5 - d / aa, 0.0, 1.0) * smoothstep(0.0, 0.08, t);
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
float k = min(s, 1.0) * side;
|
|
50
|
+
float blur = 0.05 * k + 1e-4;
|
|
51
|
+
vec2 offset = vec2(0.0, -0.03 * k);
|
|
52
|
+
float ds = roundedBox((uv - cardCenter - offset) * asp, halfSize, r);
|
|
53
|
+
float shade = shadow * (1.0 - smoothstep(-blur, blur, ds)) * smoothstep(0.0, 0.15, t);
|
|
54
|
+
|
|
55
|
+
vec4 a = getFromColor(uv);
|
|
56
|
+
|
|
57
|
+
a.rgb *= 1.0 - shade;
|
|
58
|
+
|
|
59
|
+
vec4 b = getToColor(clamp((uv - center) / max(s, 1e-4) + center, 0.0, 1.0));
|
|
60
|
+
|
|
61
|
+
vec4 c = mix(vec4(a.rgb * a.a, a.a), vec4(b.rgb * b.a, b.a), cover);
|
|
62
|
+
return c.a > 0.0 ? vec4(c.rgb / c.a, c.a) : vec4(0.0);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
half4 main(float2 _coord) {
|
|
66
|
+
vec2 _uv = _coord / _resolution;
|
|
67
|
+
vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
|
|
68
|
+
return half4(_c.rgb * _c.a, _c.a);
|
|
69
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// SmokeDissolve — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/SmokeDissolve.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: Billowing smoke drifts in across the outgoing image, with lit tops, darker folds and wispy edges, and thickens until it covers the frame; as it thins out and drifts away, the incoming image shows through
|
|
5
|
+
|
|
6
|
+
uniform shader _from;
|
|
7
|
+
uniform shader _to;
|
|
8
|
+
uniform float2 _resolution;
|
|
9
|
+
uniform float progress;
|
|
10
|
+
uniform float ratio;
|
|
11
|
+
|
|
12
|
+
vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
13
|
+
vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
|
|
14
|
+
|
|
15
|
+
uniform vec2 direction;
|
|
16
|
+
|
|
17
|
+
uniform float scale;
|
|
18
|
+
|
|
19
|
+
uniform float spread;
|
|
20
|
+
|
|
21
|
+
uniform float softness;
|
|
22
|
+
|
|
23
|
+
uniform vec4 color;
|
|
24
|
+
|
|
25
|
+
float hash12(vec2 v) {
|
|
26
|
+
vec3 v3 = fract(vec3(v.xyx) * 0.1031);
|
|
27
|
+
v3 += dot(v3, v3.yzx + 33.33);
|
|
28
|
+
return fract((v3.x + v3.y) * v3.z);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
float vnoise(vec2 v) {
|
|
32
|
+
vec2 i = floor(v);
|
|
33
|
+
vec2 f = fract(v);
|
|
34
|
+
f = f * f * (3.0 - 2.0 * f);
|
|
35
|
+
return mix(
|
|
36
|
+
mix(hash12(i), hash12(i + vec2(1.0, 0.0)), f.x),
|
|
37
|
+
mix(hash12(i + vec2(0.0, 1.0)), hash12(i + vec2(1.0, 1.0)), f.x),
|
|
38
|
+
f.y
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
float fbm(vec2 v) {
|
|
43
|
+
float sum = 0.0;
|
|
44
|
+
float amp = 0.5;
|
|
45
|
+
for (int i = 0; i < 4; i++) {
|
|
46
|
+
sum += amp * vnoise(v);
|
|
47
|
+
v = mat2(1.6, 1.2, -1.2, 1.6) * v + 5.3;
|
|
48
|
+
amp *= 0.5;
|
|
49
|
+
}
|
|
50
|
+
return sum / 0.9375;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
vec4 transition(vec2 uv) {
|
|
54
|
+
float p = progress;
|
|
55
|
+
vec2 pos = (uv - 0.5) * vec2(ratio, 1.0);
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
float len = length(direction);
|
|
59
|
+
vec2 dir = len > 1e-4 ? direction / len : vec2(0.0);
|
|
60
|
+
float ext = 0.5 * (abs(dir.x) * ratio + abs(dir.y)) + 1e-4;
|
|
61
|
+
float along = len > 1e-4 ? 0.5 + 0.5 * dot(pos, dir) / ext : 0.5;
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
float arrive = (p / 0.45) * (1.0 + spread) - spread * along;
|
|
66
|
+
float leave = ((p - 0.55) / 0.45) * (1.0 + spread) - spread * along;
|
|
67
|
+
float body = smoothstep(0.0, 1.0, arrive) * (1.0 - smoothstep(0.0, 1.0, leave));
|
|
68
|
+
|
|
69
|
+
float m = smoothstep(0.48, 0.52, p);
|
|
70
|
+
|
|
71
|
+
if (body <= 0.0) return m < 0.5 ? getFromColor(uv) : getToColor(uv);
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
vec2 q = (pos - direction * (p - 0.5)) * scale;
|
|
75
|
+
vec2 churn = vec2(0.5 * p, -0.35 * p);
|
|
76
|
+
vec2 warp = vec2(fbm(q + vec2(3.1, 1.7) + churn), fbm(q + vec2(8.3, 2.8) - churn));
|
|
77
|
+
vec2 w = q + 1.1 * (warp - 0.5);
|
|
78
|
+
float n = fbm(w);
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
float lit = 0.53 * (vnoise(w) - vnoise(w + vec2(0.0, 0.2)));
|
|
82
|
+
|
|
83
|
+
float wisp = vnoise(w * 3.3 - 2.0 * churn) - 0.5;
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
float edge = 2.0 * body - (1.0 - smoothstep(0.1, 0.6, n)) + 1.6 * body * (1.0 - body) * wisp;
|
|
87
|
+
float d = smoothstep(0.0, softness, edge) * mix(0.5, 1.0, smoothstep(0.2, 0.9, body));
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
vec4 base;
|
|
91
|
+
if (m <= 0.0) base = getFromColor(uv);
|
|
92
|
+
else if (m >= 1.0) base = getToColor(uv);
|
|
93
|
+
else {
|
|
94
|
+
vec4 a = getFromColor(uv);
|
|
95
|
+
vec4 b = getToColor(uv);
|
|
96
|
+
base = mix(vec4(a.rgb * a.a, a.a), vec4(b.rgb * b.a, b.a), m);
|
|
97
|
+
base = base.a > 0.0 ? vec4(base.rgb / base.a, base.a) : vec4(0.0);
|
|
98
|
+
}
|
|
99
|
+
if (d <= 0.0) return base;
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
float shade = 0.92 + 1.3 * lit;
|
|
103
|
+
shade *= mix(0.76, 1.04, smoothstep(0.25, 0.75, n));
|
|
104
|
+
shade = mix(1.0, shade, 0.3 + 0.7 * d);
|
|
105
|
+
vec3 smoke = clamp(color.rgb * shade, 0.0, 1.0);
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
return mix(base, vec4(smoke, color.a), d);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
half4 main(float2 _coord) {
|
|
112
|
+
vec2 _uv = _coord / _resolution;
|
|
113
|
+
vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
|
|
114
|
+
return half4(_c.rgb * _c.a, _c.a);
|
|
115
|
+
}
|