shaders 2.0.670 → 2.0.671
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/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +26 -4
- package/dist/react/index.js.map +1 -1
- package/dist/vue/index19.js +26 -4
- package/dist/vue/index85.js +3 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -36859,10 +36859,32 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
|
|
|
36859
36859
|
}, Wl = {
|
|
36860
36860
|
name: "FilmGrain",
|
|
36861
36861
|
category: "Effects",
|
|
36862
|
-
props: {
|
|
36863
|
-
|
|
36864
|
-
|
|
36865
|
-
|
|
36862
|
+
props: {
|
|
36863
|
+
strength: {
|
|
36864
|
+
default: 0.5,
|
|
36865
|
+
description: "Intensity of the film grain noise",
|
|
36866
|
+
ui: {
|
|
36867
|
+
type: "range",
|
|
36868
|
+
min: 0,
|
|
36869
|
+
max: 1,
|
|
36870
|
+
step: 0.01,
|
|
36871
|
+
label: "Strength"
|
|
36872
|
+
}
|
|
36873
|
+
},
|
|
36874
|
+
animated: {
|
|
36875
|
+
default: 0,
|
|
36876
|
+
description: "Whether the noise should animate over time",
|
|
36877
|
+
ui: {
|
|
36878
|
+
type: "checkbox",
|
|
36879
|
+
label: "Animated"
|
|
36880
|
+
}
|
|
36881
|
+
}
|
|
36882
|
+
},
|
|
36883
|
+
fragmentNode: ({ uniforms: t, childNode: e }) => {
|
|
36884
|
+
let { vec2: r, vec4: i, float: s, screenUV: n, sin: a, dot: o, fract: l, timerLocal: h } = Oe;
|
|
36885
|
+
if (!e) return console.error("You must pass a child component into the Film Noise shader."), i(0);
|
|
36886
|
+
let u = t.strength.uniform, c = t.animated.uniform, d = e || i(0, 0, 0, 0), m = n, p = c.greaterThan(s(0.5)).select(h(), s(0)), f = m.add(r(p.mul(s(0.1)), p.mul(s(0.13)))), g = o(f, r(s(12.9898), s(78.233)).mul(s(2))), y = l(a(g).mul(s(43758.5453))), v = y.mul(s(2)).sub(s(1)), w = v.mul(u.mul(s(0.1))), T = d.rgb.add(w);
|
|
36887
|
+
return i(T, d.a);
|
|
36866
36888
|
}
|
|
36867
36889
|
}, Hl = {
|
|
36868
36890
|
name: "GlassTiles",
|