shaders 2.3.71 → 2.3.72
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as transformColor } from "./transformations-B5lM6fYX.js";
|
|
2
|
-
import { floor, fract, fwidth, max, screenUV, smoothstep, vec2, vec4, viewportSize } from "three/tsl";
|
|
2
|
+
import { floor, fract, fwidth, max, screenUV, smoothstep, step, vec2, vec4, viewportSize } from "three/tsl";
|
|
3
3
|
const componentDefinition = {
|
|
4
4
|
name: "Grid",
|
|
5
5
|
category: "Textures",
|
|
@@ -60,7 +60,7 @@ const componentDefinition = {
|
|
|
60
60
|
const distToLineX = gridFract.x.min(gridFract.x.oneMinus());
|
|
61
61
|
const distToLineY = gridFract.y.min(gridFract.y.oneMinus());
|
|
62
62
|
const pixelSize = fwidth(gridUV);
|
|
63
|
-
const gridMask = max(smoothstep(lineWidth.
|
|
63
|
+
const gridMask = max(smoothstep(lineWidth.add(pixelSize.x), lineWidth, distToLineX), smoothstep(lineWidth.add(pixelSize.y), lineWidth, distToLineY)).mul(step(1e-4, lineWidth));
|
|
64
64
|
return vec4(uniforms.color.uniform.rgb, uniforms.color.uniform.a.mul(gridMask));
|
|
65
65
|
}
|
|
66
66
|
};
|
package/dist/core/registry.js
CHANGED
|
@@ -33,7 +33,7 @@ import { n as componentDefinition$26 } from "./Glitch-DoFQeNTD.js";
|
|
|
33
33
|
import { n as componentDefinition$27 } from "./Glow-CURvWSnB.js";
|
|
34
34
|
import { n as componentDefinition$28 } from "./Godrays-BWEMe4dJ.js";
|
|
35
35
|
import { n as componentDefinition$29 } from "./Grayscale-B_YZd3uy.js";
|
|
36
|
-
import { n as componentDefinition$30 } from "./Grid-
|
|
36
|
+
import { n as componentDefinition$30 } from "./Grid-BOgZleSo.js";
|
|
37
37
|
import { n as componentDefinition$31 } from "./GridDistortion-BjfEpWUs.js";
|
|
38
38
|
import { n as componentDefinition$32 } from "./Group-NJlcbnkb.js";
|
|
39
39
|
import { n as componentDefinition$33 } from "./Halftone-DogLm5Sz.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,OAAO,EAAC,cAAc,EAAC,MAAM,qCAAqC,CAAA;AAElE,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shaders/Grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAqB,MAAM,iBAAiB,CAAA;AAIvE,OAAO,EAAC,cAAc,EAAC,MAAM,qCAAqC,CAAA;AAElE,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,cAAc,CAkEnE,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../../transformations-B5lM6fYX.js";
|
|
2
|
-
import { n as componentDefinition, t as Grid_default } from "../../Grid-
|
|
2
|
+
import { n as componentDefinition, t as Grid_default } from "../../Grid-BOgZleSo.js";
|
|
3
3
|
export { componentDefinition, Grid_default as default };
|