@vib3code/sdk 2.0.3-canary.75a3290 → 2.0.3-canary.ef8d292

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.
@@ -199,6 +199,44 @@ export class ShaderLoader {
199
199
  return results;
200
200
  }
201
201
 
202
+ /**
203
+ * Resolve #include directives in shader source.
204
+ * GLSL: #include "common/rotation4d.glsl"
205
+ * WGSL: // @include "common/rotation4d.wgsl"
206
+ *
207
+ * Includes are resolved from the loader's cache (call loadCommonLibrary() first).
208
+ * Non-recursive — only resolves one level of includes.
209
+ *
210
+ * @param {string} source - Shader source with include directives
211
+ * @returns {string} Resolved shader source
212
+ */
213
+ resolveIncludes(source) {
214
+ if (!source) return source;
215
+
216
+ // GLSL: #include "path"
217
+ // WGSL: // @include "path"
218
+ const includeRegex = /(?:^|\n)\s*(?:#include|\/\/\s*@include)\s+"([^"]+)"\s*(?:\n|$)/g;
219
+
220
+ return source.replace(includeRegex, (match, path) => {
221
+ const cached = this._cache.get(path);
222
+ if (cached) {
223
+ return '\n// --- included from ' + path + ' ---\n' + cached + '\n// --- end ' + path + ' ---\n';
224
+ }
225
+ console.warn(`ShaderLoader: Include not found in cache: "${path}" — load it first via loadCommonLibrary()`);
226
+ return match; // Leave directive in place if not found
227
+ });
228
+ }
229
+
230
+ /**
231
+ * Load a shader file and resolve includes.
232
+ * @param {string} relativePath
233
+ * @returns {Promise<string|null>}
234
+ */
235
+ async loadAndResolve(relativePath) {
236
+ const source = await this.load(relativePath);
237
+ return source ? this.resolveIncludes(source) : null;
238
+ }
239
+
202
240
  /**
203
241
  * Clear all cached shaders.
204
242
  */
@@ -384,10 +384,10 @@ export const ShaderLib = {
384
384
  mat4 rotateXZ(float angle) {
385
385
  float c = cos(angle), s = sin(angle);
386
386
  return mat4(
387
- c, 0, -s, 0,
388
- 0, 1, 0, 0,
389
- s, 0, c, 0,
390
- 0, 0, 0, 1
387
+ c, 0, s, 0,
388
+ 0, 1, 0, 0,
389
+ -s, 0, c, 0,
390
+ 0, 0, 0, 1
391
391
  );
392
392
  }
393
393
 
@@ -25,7 +25,7 @@ import { createWebGPUBackend, isWebGPUSupported, WGSLShaderLib } from './backend
25
25
  * @returns {Float32Array}
26
26
  */
27
27
  function packVIB3Uniforms(uniforms) {
28
- // Total: 32 floats = 128 bytes → aligned to 256 bytes in buffer
28
+ // Total: 33 floats (indices 0-32) = 132 bytes → padded to 256 bytes in buffer
29
29
  const data = new Float32Array(64); // 256 bytes
30
30
 
31
31
  data[0] = uniforms.u_time || 0;
@@ -152,10 +152,14 @@ struct VIB3Uniforms {
152
152
  layerScale: f32,
153
153
  layerOpacity: f32,
154
154
  _pad1: f32,
155
- layerColor: vec3<f32>,
155
+ layerColorR: f32,
156
+ layerColorG: f32,
157
+ layerColorB: f32,
156
158
  densityMult: f32,
157
159
  speedMult: f32,
158
- _pad2: vec3<f32>,
160
+
161
+ // Vitality
162
+ breath: f32,
159
163
  };
160
164
  `;
161
165
 
@@ -178,9 +182,9 @@ fn rotateXZ(angle: f32) -> mat4x4<f32> {
178
182
  let c = cos(angle);
179
183
  let s = sin(angle);
180
184
  return mat4x4<f32>(
181
- vec4<f32>(c, 0.0, -s, 0.0),
185
+ vec4<f32>( c, 0.0, s, 0.0),
182
186
  vec4<f32>(0.0, 1.0, 0.0, 0.0),
183
- vec4<f32>(s, 0.0, c, 0.0),
187
+ vec4<f32>(-s, 0.0, c, 0.0),
184
188
  vec4<f32>(0.0, 0.0, 0.0, 1.0)
185
189
  );
186
190
  }
@@ -53,6 +53,71 @@ float hypertetrahedronCore(vec4 p, float baseType) {
53
53
  return max(baseShape, tetraField);
54
54
  }
55
55
 
56
+ // ── Polytope Core Warp Functions ──
57
+ // Requires: rotation matrices from rotation4d.glsl, project4Dto3D, and u_* uniforms
58
+
59
+ vec3 warpHypersphereCore(vec3 p, int geometryIndex, vec2 mouseDelta) {
60
+ float radius = length(p);
61
+ float morphBlend = clamp(u_morphFactor * 0.6 + (u_dimension - 3.0) * 0.25, 0.0, 2.0);
62
+ float w = sin(radius * (1.3 + float(geometryIndex) * 0.12) + u_time * 0.0008 * u_speed);
63
+ w *= (0.4 + morphBlend * 0.45);
64
+
65
+ vec4 p4d = vec4(p * (1.0 + morphBlend * 0.2), w);
66
+ p4d = rotateXY(u_rot4dXY) * p4d;
67
+ p4d = rotateXZ(u_rot4dXZ) * p4d;
68
+ p4d = rotateYZ(u_rot4dYZ) * p4d;
69
+ p4d = rotateXW(u_rot4dXW) * p4d;
70
+ p4d = rotateYW(u_rot4dYW) * p4d;
71
+ p4d = rotateZW(u_rot4dZW) * p4d;
72
+
73
+ vec3 projected = project4Dto3D(p4d);
74
+ return mix(p, projected, clamp(0.45 + morphBlend * 0.35, 0.0, 1.0));
75
+ }
76
+
77
+ vec3 warpHypertetraCore(vec3 p, int geometryIndex, vec2 mouseDelta) {
78
+ vec3 c1 = normalize(vec3(1.0, 1.0, 1.0));
79
+ vec3 c2 = normalize(vec3(-1.0, -1.0, 1.0));
80
+ vec3 c3 = normalize(vec3(-1.0, 1.0, -1.0));
81
+ vec3 c4 = normalize(vec3(1.0, -1.0, -1.0));
82
+
83
+ float morphBlend = clamp(u_morphFactor * 0.8 + (u_dimension - 3.0) * 0.2, 0.0, 2.0);
84
+ float basisMix = dot(p, c1) * 0.14 + dot(p, c2) * 0.1 + dot(p, c3) * 0.08;
85
+ float w = sin(basisMix * 5.5 + u_time * 0.0009 * u_speed);
86
+ w *= cos(dot(p, c4) * 4.2 - u_time * 0.0007 * u_speed);
87
+ w *= (0.5 + morphBlend * 0.4);
88
+
89
+ vec3 offset = vec3(dot(p, c1), dot(p, c2), dot(p, c3)) * 0.1 * morphBlend;
90
+ vec4 p4d = vec4(p + offset, w);
91
+ p4d = rotateXY(u_rot4dXY) * p4d;
92
+ p4d = rotateXZ(u_rot4dXZ) * p4d;
93
+ p4d = rotateYZ(u_rot4dYZ) * p4d;
94
+ p4d = rotateXW(u_rot4dXW) * p4d;
95
+ p4d = rotateYW(u_rot4dYW) * p4d;
96
+ p4d = rotateZW(u_rot4dZW) * p4d;
97
+
98
+ vec3 projected = project4Dto3D(p4d);
99
+ float planeInfluence = min(min(abs(dot(p, c1)), abs(dot(p, c2))),
100
+ min(abs(dot(p, c3)), abs(dot(p, c4))));
101
+ vec3 blended = mix(p, projected, clamp(0.45 + morphBlend * 0.35, 0.0, 1.0));
102
+ return mix(blended, blended * (1.0 - planeInfluence * 0.55), 0.2 + morphBlend * 0.2);
103
+ }
104
+
105
+ vec3 applyCoreWarp(vec3 p, float geometryType, vec2 mouseDelta) {
106
+ float totalBase = 8.0;
107
+ float coreFloat = floor(geometryType / totalBase);
108
+ int coreIndex = int(clamp(coreFloat, 0.0, 2.0));
109
+ float baseGeomFloat = geometryType - floor(geometryType / totalBase) * totalBase;
110
+ int geometryIndex = int(clamp(floor(baseGeomFloat + 0.5), 0.0, totalBase - 1.0));
111
+
112
+ if (coreIndex == 1) {
113
+ return warpHypersphereCore(p, geometryIndex, mouseDelta);
114
+ }
115
+ if (coreIndex == 2) {
116
+ return warpHypertetraCore(p, geometryIndex, mouseDelta);
117
+ }
118
+ return p;
119
+ }
120
+
56
121
  // Main geometry dispatcher (0-23)
57
122
  float geometry(vec4 p, float type) {
58
123
  if (type < 8.0) {
@@ -47,6 +47,60 @@ fn hypertetrahedronCore(p: vec4<f32>, baseType: f32) -> f32 {
47
47
  return max(baseGeometry(p, baseType), tf);
48
48
  }
49
49
 
50
+ // ── Polytope Core Warp Functions ──
51
+ // Requires: rotation functions from rotation4d.wgsl and u: VIB3Uniforms
52
+
53
+ fn warpHypersphereCore_common(p: vec3<f32>, geomIdx: i32) -> vec3<f32> {
54
+ let radius = length(p);
55
+ let morphBlend = clamp(u.morphFactor * 0.6 + (u.dimension - 3.0) * 0.25, 0.0, 2.0);
56
+ let w = sin(radius * (1.3 + f32(geomIdx) * 0.12) + u.time * 0.0008 * u.speed)
57
+ * (0.4 + morphBlend * 0.45);
58
+ var p4d = vec4<f32>(p * (1.0 + morphBlend * 0.2), w);
59
+ p4d = rotateXY(u.rot4dXY) * p4d;
60
+ p4d = rotateXZ(u.rot4dXZ) * p4d;
61
+ p4d = rotateYZ(u.rot4dYZ) * p4d;
62
+ p4d = rotateXW(u.rot4dXW) * p4d;
63
+ p4d = rotateYW(u.rot4dYW) * p4d;
64
+ p4d = rotateZW(u.rot4dZW) * p4d;
65
+ let proj = project4Dto3D(p4d);
66
+ return mix(p, proj, clamp(0.45 + morphBlend * 0.35, 0.0, 1.0));
67
+ }
68
+
69
+ fn warpHypertetraCore_common(p: vec3<f32>, geomIdx: i32) -> vec3<f32> {
70
+ let c1 = normalize(vec3<f32>(1.0, 1.0, 1.0));
71
+ let c2 = normalize(vec3<f32>(-1.0, -1.0, 1.0));
72
+ let c3 = normalize(vec3<f32>(-1.0, 1.0, -1.0));
73
+ let c4 = normalize(vec3<f32>(1.0, -1.0, -1.0));
74
+ let morphBlend = clamp(u.morphFactor * 0.8 + (u.dimension - 3.0) * 0.2, 0.0, 2.0);
75
+ let basisMix = dot(p, c1) * 0.14 + dot(p, c2) * 0.1 + dot(p, c3) * 0.08;
76
+ let w = sin(basisMix * 5.5 + u.time * 0.0009 * u.speed)
77
+ * cos(dot(p, c4) * 4.2 - u.time * 0.0007 * u.speed)
78
+ * (0.5 + morphBlend * 0.4);
79
+ let offset = vec3<f32>(dot(p, c1), dot(p, c2), dot(p, c3)) * 0.1 * morphBlend;
80
+ var p4d = vec4<f32>(p + offset, w);
81
+ p4d = rotateXY(u.rot4dXY) * p4d;
82
+ p4d = rotateXZ(u.rot4dXZ) * p4d;
83
+ p4d = rotateYZ(u.rot4dYZ) * p4d;
84
+ p4d = rotateXW(u.rot4dXW) * p4d;
85
+ p4d = rotateYW(u.rot4dYW) * p4d;
86
+ p4d = rotateZW(u.rot4dZW) * p4d;
87
+ let proj = project4Dto3D(p4d);
88
+ let planeInf = min(min(abs(dot(p, c1)), abs(dot(p, c2))),
89
+ min(abs(dot(p, c3)), abs(dot(p, c4))));
90
+ let blended = mix(p, proj, clamp(0.45 + morphBlend * 0.35, 0.0, 1.0));
91
+ return mix(blended, blended * (1.0 - planeInf * 0.55), 0.2 + morphBlend * 0.2);
92
+ }
93
+
94
+ fn applyCoreWarp_common(p: vec3<f32>, geomType: f32) -> vec3<f32> {
95
+ let coreFloat = floor(geomType / 8.0);
96
+ let coreIndex = i32(clamp(coreFloat, 0.0, 2.0));
97
+ let baseFloat = geomType - floor(geomType / 8.0) * 8.0;
98
+ let geomIdx = i32(clamp(floor(baseFloat + 0.5), 0.0, 7.0));
99
+ if (coreIndex == 1) { return warpHypersphereCore_common(p, geomIdx); }
100
+ if (coreIndex == 2) { return warpHypertetraCore_common(p, geomIdx); }
101
+ return p;
102
+ }
103
+
50
104
  fn geometry(p: vec4<f32>, t: f32) -> f32 {
51
105
  if (t < 8.0) { return baseGeometry(p, t); }
52
106
  else if (t < 16.0) { return hypersphereCore(p, t - 8.0); }
@@ -16,10 +16,10 @@ mat4 rotateXZ(float angle) {
16
16
  float c = cos(angle);
17
17
  float s = sin(angle);
18
18
  return mat4(
19
- c, 0, -s, 0,
20
- 0, 1, 0, 0,
21
- s, 0, c, 0,
22
- 0, 0, 0, 1
19
+ c, 0, s, 0,
20
+ 0, 1, 0, 0,
21
+ -s, 0, c, 0,
22
+ 0, 0, 0, 1
23
23
  );
24
24
  }
25
25
 
@@ -16,9 +16,9 @@ fn rotateXZ(angle: f32) -> mat4x4<f32> {
16
16
  let c = cos(angle);
17
17
  let s = sin(angle);
18
18
  return mat4x4<f32>(
19
- vec4<f32>(c, 0.0, -s, 0.0),
19
+ vec4<f32>( c, 0.0, s, 0.0),
20
20
  vec4<f32>(0.0, 1.0, 0.0, 0.0),
21
- vec4<f32>(s, 0.0, c, 0.0),
21
+ vec4<f32>(-s, 0.0, c, 0.0),
22
22
  vec4<f32>(0.0, 0.0, 0.0, 1.0)
23
23
  );
24
24
  }
@@ -1,16 +1,19 @@
1
1
  // VIB3+ Common Uniform Struct (WGSL)
2
2
  // Shared across all visualization systems
3
+ // Canonical layout — must match packVIB3Uniforms() in UnifiedRenderBridge.js
4
+ // All fields are f32 (except resolution vec2) to avoid alignment surprises.
5
+ // Total: 33 floats (132 bytes), buffer padded to 256 bytes.
3
6
 
4
7
  struct VIB3Uniforms {
5
- // Time and resolution
8
+ // Time and resolution (indices 0-3)
6
9
  time: f32,
7
10
  _pad0: f32,
8
11
  resolution: vec2<f32>,
9
12
 
10
- // Geometry selection (0-23)
13
+ // Geometry selection 0-23 (index 4)
11
14
  geometry: f32,
12
15
 
13
- // 6D Rotation (radians)
16
+ // 6D Rotation in radians (indices 5-10)
14
17
  rot4dXY: f32,
15
18
  rot4dXZ: f32,
16
19
  rot4dYZ: f32,
@@ -18,7 +21,7 @@ struct VIB3Uniforms {
18
21
  rot4dYW: f32,
19
22
  rot4dZW: f32,
20
23
 
21
- // Visual parameters
24
+ // Visual parameters (indices 11-18)
22
25
  dimension: f32,
23
26
  gridDensity: f32,
24
27
  morphFactor: f32,
@@ -28,21 +31,25 @@ struct VIB3Uniforms {
28
31
  intensity: f32,
29
32
  saturation: f32,
30
33
 
31
- // Reactivity
34
+ // Reactivity (indices 19-23)
32
35
  mouseIntensity: f32,
33
36
  clickIntensity: f32,
34
37
  bass: f32,
35
38
  mid: f32,
36
39
  high: f32,
37
40
 
38
- // Layer parameters (holographic multi-layer)
41
+ // Layer parameters (indices 24-31)
39
42
  layerScale: f32,
40
43
  layerOpacity: f32,
41
44
  _pad1: f32,
42
- layerColor: vec3<f32>,
45
+ layerColorR: f32,
46
+ layerColorG: f32,
47
+ layerColorB: f32,
43
48
  densityMult: f32,
44
49
  speedMult: f32,
45
- _pad2: vec3<f32>,
50
+
51
+ // Vitality (index 32)
52
+ breath: f32,
46
53
  };
47
54
 
48
55
  @group(0) @binding(0) var<uniform> u: VIB3Uniforms;
@@ -4,7 +4,7 @@
4
4
 
5
5
  struct VIB3Uniforms {
6
6
  time: f32,
7
- speed: f32,
7
+ _pad0: f32,
8
8
  resolution: vec2<f32>,
9
9
  geometry: f32,
10
10
  rot4dXY: f32,
@@ -17,18 +17,24 @@ struct VIB3Uniforms {
17
17
  gridDensity: f32,
18
18
  morphFactor: f32,
19
19
  chaos: f32,
20
+ speed: f32,
20
21
  hue: f32,
21
22
  intensity: f32,
22
23
  saturation: f32,
23
24
  mouseIntensity: f32,
24
25
  clickIntensity: f32,
25
- roleIntensity: f32,
26
26
  bass: f32,
27
27
  mid: f32,
28
28
  high: f32,
29
+ layerScale: f32,
30
+ layerOpacity: f32,
31
+ _pad1: f32,
32
+ layerColorR: f32,
33
+ layerColorG: f32,
34
+ layerColorB: f32,
35
+ densityMult: f32,
36
+ speedMult: f32,
29
37
  breath: f32,
30
- mouse: vec2<f32>,
31
- _pad1: vec2<f32>,
32
38
  };
33
39
 
34
40
  @group(0) @binding(0) var<uniform> u: VIB3Uniforms;
@@ -131,8 +137,15 @@ fn geometryFunction_w(p: vec4<f32>) -> f32 {
131
137
  let gt = i32(clamp(floor(baseFloat + 0.5), 0.0, 7.0));
132
138
  let d = u.gridDensity * 0.08;
133
139
  if (gt == 0) {
134
- let pos = fract(p * d); let dist = min(pos, 1.0 - pos);
135
- return min(min(dist.x, dist.y), min(dist.z, dist.w)) * u.morphFactor;
140
+ // Tetrahedron tetrahedral symmetry planes
141
+ let c1 = normalize(vec3<f32>(1.0, 1.0, 1.0));
142
+ let c2 = normalize(vec3<f32>(-1.0, -1.0, 1.0));
143
+ let c3 = normalize(vec3<f32>(-1.0, 1.0, -1.0));
144
+ let c4 = normalize(vec3<f32>(1.0, -1.0, -1.0));
145
+ let q = fract(p.xyz * d + 0.5) - 0.5;
146
+ let minPlane = min(min(abs(dot(q, c1)), abs(dot(q, c2))),
147
+ min(abs(dot(q, c3)), abs(dot(q, c4))));
148
+ return (1.0 - smoothstep(0.0, 0.05, minPlane)) * u.morphFactor;
136
149
  } else if (gt == 1) {
137
150
  let pos = fract(p * d); let dist = min(pos, 1.0 - pos);
138
151
  return min(min(dist.x, dist.y), min(dist.z, dist.w)) * u.morphFactor;
@@ -28,11 +28,13 @@ struct VIB3Uniforms {
28
28
  high: f32,
29
29
  layerScale: f32,
30
30
  layerOpacity: f32,
31
- breath: f32,
32
- layerColor: vec3<f32>,
31
+ _pad1: f32,
32
+ layerColorR: f32,
33
+ layerColorG: f32,
34
+ layerColorB: f32,
33
35
  densityMult: f32,
34
36
  speedMult: f32,
35
- _pad2: vec3<f32>,
37
+ breath: f32,
36
38
  };
37
39
 
38
40
  @group(0) @binding(0) var<uniform> u: VIB3Uniforms;
@@ -52,8 +54,8 @@ fn rotateXY(angle: f32) -> mat4x4<f32> {
52
54
  fn rotateXZ(angle: f32) -> mat4x4<f32> {
53
55
  let c = cos(angle); let s = sin(angle);
54
56
  return mat4x4<f32>(
55
- vec4<f32>(c, 0.0, -s, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0),
56
- vec4<f32>(s, 0.0, c, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
57
+ vec4<f32>(c, 0.0, s, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0),
58
+ vec4<f32>(-s, 0.0, c, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
57
59
  }
58
60
  fn rotateYZ(angle: f32) -> mat4x4<f32> {
59
61
  let c = cos(angle); let s = sin(angle);
@@ -28,11 +28,13 @@ struct VIB3Uniforms {
28
28
  high: f32,
29
29
  layerScale: f32,
30
30
  layerOpacity: f32,
31
- breath: f32,
32
- layerColor: vec3<f32>,
31
+ _pad1: f32,
32
+ layerColorR: f32,
33
+ layerColorG: f32,
34
+ layerColorB: f32,
33
35
  densityMult: f32,
34
36
  speedMult: f32,
35
- _pad2: vec3<f32>,
37
+ breath: f32,
36
38
  };
37
39
 
38
40
  @group(0) @binding(0) var<uniform> u: VIB3Uniforms;
@@ -52,8 +54,8 @@ fn rotateXY(angle: f32) -> mat4x4<f32> {
52
54
  fn rotateXZ(angle: f32) -> mat4x4<f32> {
53
55
  let c = cos(angle); let s = sin(angle);
54
56
  return mat4x4<f32>(
55
- vec4<f32>(c, 0.0, -s, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0),
56
- vec4<f32>(s, 0.0, c, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
57
+ vec4<f32>(c, 0.0, s, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0),
58
+ vec4<f32>(-s, 0.0, c, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
57
59
  }
58
60
  fn rotateYZ(angle: f32) -> mat4x4<f32> {
59
61
  let c = cos(angle); let s = sin(angle);
@@ -546,9 +546,9 @@ fn rotateXZ(angle: f32) -> mat4x4<f32> {
546
546
  let c = cos(angle);
547
547
  let s = sin(angle);
548
548
  return mat4x4<f32>(
549
- vec4<f32>(c, 0.0, -s, 0.0),
549
+ vec4<f32>( c, 0.0, s, 0.0),
550
550
  vec4<f32>(0.0, 1.0, 0.0, 0.0),
551
- vec4<f32>(s, 0.0, c, 0.0),
551
+ vec4<f32>(-s, 0.0, c, 0.0),
552
552
  vec4<f32>(0.0, 0.0, 0.0, 1.0)
553
553
  );
554
554
  }
@@ -602,6 +602,7 @@ const FACETED_GLSL_FRAGMENT = `
602
602
  precision highp float;
603
603
  uniform float u_time;
604
604
  uniform vec2 u_resolution;
605
+ uniform vec2 u_mouse;
605
606
  uniform float u_geometry;
606
607
  uniform float u_rot4dXY;
607
608
  uniform float u_rot4dXZ;
@@ -619,6 +620,7 @@ uniform float u_saturation;
619
620
  uniform float u_speed;
620
621
  uniform float u_mouseIntensity;
621
622
  uniform float u_clickIntensity;
623
+ uniform float u_roleIntensity;
622
624
  uniform float u_bass;
623
625
  uniform float u_mid;
624
626
  uniform float u_high;
@@ -667,7 +669,8 @@ struct VIB3Uniforms {
667
669
 
668
670
  /**
669
671
  * Holographic system GLSL fragment shader uniforms (from HolographicVisualizer.js).
670
- * This system uses non-standard names for several uniforms.
672
+ * Uses standard names (u_gridDensity, u_morphFactor, u_geometry) plus many
673
+ * system-specific uniforms for audio/touch/scroll reactivity.
671
674
  */
672
675
  const HOLOGRAPHIC_GLSL_FRAGMENT = `
673
676
  precision highp float;
@@ -675,7 +678,7 @@ uniform vec2 u_resolution;
675
678
  uniform float u_time;
676
679
  uniform vec2 u_mouse;
677
680
  uniform float u_geometry;
678
- uniform float u_density;
681
+ uniform float u_gridDensity;
679
682
  uniform float u_speed;
680
683
  uniform vec3 u_color;
681
684
  uniform float u_intensity;
@@ -686,9 +689,8 @@ uniform float u_chaosIntensity;
686
689
  uniform float u_mouseIntensity;
687
690
  uniform float u_clickIntensity;
688
691
  uniform float u_densityVariation;
689
- uniform float u_geometryType;
690
692
  uniform float u_chaos;
691
- uniform float u_morph;
693
+ uniform float u_morphFactor;
692
694
  uniform float u_touchMorph;
693
695
  uniform float u_touchChaos;
694
696
  uniform float u_scrollParallax;