@luma.gl/shadertools 9.1.0-alpha.15 → 9.1.0-alpha.16

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.
Files changed (81) hide show
  1. package/dist/dist.dev.js +47 -47
  2. package/dist/dist.min.js +34 -42
  3. package/dist/index.cjs +47 -47
  4. package/dist/index.cjs.map +2 -2
  5. package/dist/lib/shader-module/shader-module.d.ts +2 -2
  6. package/dist/lib/shader-module/shader-module.d.ts.map +1 -1
  7. package/dist/lib/shader-module/shader-module.js +22 -4
  8. package/dist/module-injectors.d.ts +1 -1
  9. package/dist/module-injectors.d.ts.map +1 -1
  10. package/dist/module-injectors.js +5 -5
  11. package/dist/modules/lighting/lights/lighting.d.ts.map +1 -1
  12. package/dist/modules/lighting/lights/lighting.js +1 -0
  13. package/dist/modules/module-injectors.d.ts +1 -1
  14. package/dist/modules/module-injectors.d.ts.map +1 -1
  15. package/dist/modules/module-injectors.js +5 -5
  16. package/dist/passes/postprocessing/fxaa/fxaa.d.ts +1 -1
  17. package/dist/passes/postprocessing/fxaa/fxaa.js +1 -1
  18. package/dist/passes/postprocessing/image-adjust-filters/brightnesscontrast.d.ts +7 -3
  19. package/dist/passes/postprocessing/image-adjust-filters/brightnesscontrast.d.ts.map +1 -1
  20. package/dist/passes/postprocessing/image-adjust-filters/brightnesscontrast.js +7 -3
  21. package/dist/passes/postprocessing/image-adjust-filters/denoise.d.ts +1 -1
  22. package/dist/passes/postprocessing/image-adjust-filters/denoise.js +1 -1
  23. package/dist/passes/postprocessing/image-adjust-filters/huesaturation.d.ts +2 -2
  24. package/dist/passes/postprocessing/image-adjust-filters/huesaturation.js +2 -2
  25. package/dist/passes/postprocessing/image-adjust-filters/noise.d.ts +2 -2
  26. package/dist/passes/postprocessing/image-adjust-filters/noise.d.ts.map +1 -1
  27. package/dist/passes/postprocessing/image-adjust-filters/noise.js +2 -6
  28. package/dist/passes/postprocessing/image-adjust-filters/sepia.d.ts +2 -2
  29. package/dist/passes/postprocessing/image-adjust-filters/sepia.js +2 -2
  30. package/dist/passes/postprocessing/image-adjust-filters/vibrance.d.ts +2 -2
  31. package/dist/passes/postprocessing/image-adjust-filters/vibrance.js +2 -2
  32. package/dist/passes/postprocessing/image-adjust-filters/vignette.d.ts +6 -2
  33. package/dist/passes/postprocessing/image-adjust-filters/vignette.d.ts.map +1 -1
  34. package/dist/passes/postprocessing/image-adjust-filters/vignette.js +6 -6
  35. package/dist/passes/postprocessing/image-blur-filters/tiltshift.d.ts +1 -1
  36. package/dist/passes/postprocessing/image-blur-filters/tiltshift.js +1 -1
  37. package/dist/passes/postprocessing/image-blur-filters/triangleblur.d.ts +1 -1
  38. package/dist/passes/postprocessing/image-blur-filters/triangleblur.js +1 -1
  39. package/dist/passes/postprocessing/image-blur-filters/zoomblur.d.ts +1 -1
  40. package/dist/passes/postprocessing/image-blur-filters/zoomblur.js +1 -1
  41. package/dist/passes/postprocessing/image-fun-filters/colorhalftone.d.ts +2 -2
  42. package/dist/passes/postprocessing/image-fun-filters/colorhalftone.js +2 -2
  43. package/dist/passes/postprocessing/image-fun-filters/dotscreen.d.ts +2 -2
  44. package/dist/passes/postprocessing/image-fun-filters/dotscreen.js +2 -2
  45. package/dist/passes/postprocessing/image-fun-filters/edgework.d.ts +3 -3
  46. package/dist/passes/postprocessing/image-fun-filters/edgework.js +3 -3
  47. package/dist/passes/postprocessing/image-fun-filters/hexagonalpixelate.d.ts +1 -1
  48. package/dist/passes/postprocessing/image-fun-filters/hexagonalpixelate.js +1 -1
  49. package/dist/passes/postprocessing/image-fun-filters/ink.d.ts +1 -1
  50. package/dist/passes/postprocessing/image-fun-filters/ink.js +1 -1
  51. package/dist/passes/postprocessing/image-fun-filters/magnify.d.ts +1 -1
  52. package/dist/passes/postprocessing/image-fun-filters/magnify.js +1 -1
  53. package/dist/passes/postprocessing/image-warp-filters/bulgepinch.d.ts +1 -1
  54. package/dist/passes/postprocessing/image-warp-filters/bulgepinch.js +1 -1
  55. package/dist/passes/postprocessing/image-warp-filters/swirl.d.ts +1 -1
  56. package/dist/passes/postprocessing/image-warp-filters/swirl.js +1 -1
  57. package/package.json +2 -2
  58. package/src/lib/shader-module/shader-module.ts +25 -6
  59. package/src/module-injectors.ts +5 -5
  60. package/src/modules/engine/picking/README.md +9 -9
  61. package/src/modules/lighting/lights/lighting.ts +1 -0
  62. package/src/modules/module-injectors.ts +5 -5
  63. package/src/passes/postprocessing/fxaa/fxaa.ts +1 -1
  64. package/src/passes/postprocessing/image-adjust-filters/brightnesscontrast.ts +7 -3
  65. package/src/passes/postprocessing/image-adjust-filters/denoise.ts +1 -1
  66. package/src/passes/postprocessing/image-adjust-filters/huesaturation.ts +2 -2
  67. package/src/passes/postprocessing/image-adjust-filters/noise.ts +2 -6
  68. package/src/passes/postprocessing/image-adjust-filters/sepia.ts +2 -2
  69. package/src/passes/postprocessing/image-adjust-filters/vibrance.ts +2 -2
  70. package/src/passes/postprocessing/image-adjust-filters/vignette.ts +6 -6
  71. package/src/passes/postprocessing/image-blur-filters/tiltshift.ts +1 -1
  72. package/src/passes/postprocessing/image-blur-filters/triangleblur.ts +1 -1
  73. package/src/passes/postprocessing/image-blur-filters/zoomblur.ts +1 -1
  74. package/src/passes/postprocessing/image-fun-filters/colorhalftone.ts +2 -2
  75. package/src/passes/postprocessing/image-fun-filters/dotscreen.ts +2 -2
  76. package/src/passes/postprocessing/image-fun-filters/edgework.ts +3 -3
  77. package/src/passes/postprocessing/image-fun-filters/hexagonalpixelate.ts +1 -1
  78. package/src/passes/postprocessing/image-fun-filters/ink.ts +1 -1
  79. package/src/passes/postprocessing/image-fun-filters/magnify.ts +1 -1
  80. package/src/passes/postprocessing/image-warp-filters/bulgepinch.ts +1 -1
  81. package/src/passes/postprocessing/image-warp-filters/swirl.ts +1 -1
package/dist/dist.dev.js CHANGED
@@ -203,20 +203,20 @@ var __exports__ = (() => {
203
203
  var MODULE_INJECTORS_FS = (
204
204
  /* glsl */
205
205
  `#ifdef MODULE_MATERIAL
206
- gl_FragColor = material_filterColor(gl_FragColor);
206
+ fragColor = material_filterColor(fragColor);
207
207
  #endif
208
208
 
209
209
  #ifdef MODULE_LIGHTING
210
- gl_FragColor = lighting_filterColor(gl_FragColor);
210
+ fragColor = lighting_filterColor(fragColor);
211
211
  #endif
212
212
 
213
213
  #ifdef MODULE_FOG
214
- gl_FragColor = fog_filterColor(gl_FragColor);
214
+ fragColor = fog_filterColor(fragColor);
215
215
  #endif
216
216
 
217
217
  #ifdef MODULE_PICKING
218
- gl_FragColor = picking_filterHighlightColor(gl_FragColor);
219
- gl_FragColor = picking_filterPickingColor(gl_FragColor);
218
+ fragColor = picking_filterHighlightColor(fragColor);
219
+ fragColor = picking_filterPickingColor(fragColor);
220
220
  #endif
221
221
 
222
222
  #ifdef MODULE_LOGDEPTH
@@ -334,7 +334,7 @@ ${inject[key]}` : inject[key];
334
334
  }
335
335
  initializeShaderModules(module.dependencies || []);
336
336
  const {
337
- uniformPropTypes = {},
337
+ propTypes = {},
338
338
  deprecations = [],
339
339
  // defines = {},
340
340
  inject = {}
@@ -343,15 +343,15 @@ ${inject[key]}` : inject[key];
343
343
  normalizedInjections: normalizeInjections(inject),
344
344
  parsedDeprecations: parseDeprecationDefinitions(deprecations)
345
345
  };
346
- if (uniformPropTypes) {
347
- instance.propValidators = makePropValidators(uniformPropTypes);
346
+ if (propTypes) {
347
+ instance.propValidators = makePropValidators(propTypes);
348
348
  }
349
349
  module.instance = instance;
350
350
  }
351
351
  function getShaderModuleUniforms(module, props, oldUniforms) {
352
352
  initializeShaderModule(module);
353
353
  const uniforms = oldUniforms || { ...module.defaultUniforms };
354
- if (module.getUniforms) {
354
+ if (props && module.getUniforms) {
355
355
  return module.getUniforms(props, uniforms);
356
356
  }
357
357
  return getValidatedProperties(props, module.instance?.propValidators, module.name);
@@ -8052,7 +8052,7 @@ vec4 pbr_filterColor(vec4 colorUnused)
8052
8052
  // Binding 0:1 is reserved for shader passes
8053
8053
  @binding(1) @group(0) var<uniform> brightnessContrast : brightnessContrastUniforms;
8054
8054
 
8055
- fn brightnessContrast_filterColor(color: vec4<f32>, texSize: vec2<f32>, texCoords: vec2<f32>) -> vec4<f32> {
8055
+ fn brightnessContrast_filterColor_ext(color: vec4<f32>, texSize: vec2<f32>, texCoords: vec2<f32>) -> vec4<f32> {
8056
8056
  color.rgb += brightnessContrast.brightness;
8057
8057
  if (brightnessContrast.contrast > 0.0) {
8058
8058
  color.rgb = (color.rgb - 0.5) / (1.0 - brightnessContrast.contrast) + 0.5;
@@ -8080,7 +8080,7 @@ vec4 brightnessContrast_filterColor(vec4 color) {
8080
8080
  return color;
8081
8081
  }
8082
8082
 
8083
- vec4 brightnessContrast_filterColor(vec4 color, vec2 texSize, vec2 texCoords) {
8083
+ vec4 brightnessContrast_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8084
8084
  return brightnessContrast_filterColor(color);
8085
8085
  }
8086
8086
  `
@@ -8093,7 +8093,11 @@ vec4 brightnessContrast_filterColor(vec4 color, vec2 texSize, vec2 texCoords) {
8093
8093
  brightness: "f32",
8094
8094
  contrast: "f32"
8095
8095
  },
8096
- uniformPropTypes: {
8096
+ defaultUniforms: {
8097
+ brightness: 0,
8098
+ contrast: 0
8099
+ },
8100
+ propTypes: {
8097
8101
  brightness: { format: "f32", value: 0, min: -1, max: 1 },
8098
8102
  contrast: { format: "f32", value: 0, min: -1, max: 1 }
8099
8103
  },
@@ -8136,7 +8140,7 @@ vec4 denoise_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8136
8140
  uniformTypes: {
8137
8141
  strength: "f32"
8138
8142
  },
8139
- uniformPropTypes: {
8143
+ propTypes: {
8140
8144
  strength: { format: "f32", value: 0.5, min: 0, max: 1 }
8141
8145
  // strength: {..., adjust: (strength: number): number => 0.53 + 200 * Math.pow(1 - strength, 4) // TODO - JS preprocessing
8142
8146
  },
@@ -8175,7 +8179,7 @@ vec4 hueSaturation_filterColor(vec4 color) {
8175
8179
  return color;
8176
8180
  }
8177
8181
 
8178
- vec4 hueSaturation_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8182
+ vec4 hueSaturation_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8179
8183
  return hueSaturation_filterColor(color);
8180
8184
  }
8181
8185
  `
@@ -8189,7 +8193,7 @@ vec4 hueSaturation_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8189
8193
  hue: "f32",
8190
8194
  saturation: "f32"
8191
8195
  },
8192
- uniformPropTypes: {
8196
+ propTypes: {
8193
8197
  hue: { value: 0, min: -1, max: 1 },
8194
8198
  saturation: { value: 0, min: -1, max: 1 }
8195
8199
  },
@@ -8207,17 +8211,13 @@ float rand(vec2 co) {
8207
8211
  return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
8208
8212
  }
8209
8213
 
8210
- vec4 noise_filterColor(vec4 color, vec2 texCoord) {
8214
+ vec4 noise_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8211
8215
  float diff = (rand(texCoord) - 0.5) * noise.amount;
8212
8216
  color.r += diff;
8213
8217
  color.g += diff;
8214
8218
  color.b += diff;
8215
8219
  return color;
8216
8220
  }
8217
-
8218
- vec4 noise_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8219
- return noise_filterColor(color, texCoord);
8220
- }
8221
8221
  `
8222
8222
  );
8223
8223
  var noise = {
@@ -8227,7 +8227,7 @@ vec4 noise_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8227
8227
  uniformTypes: {
8228
8228
  amount: "f32"
8229
8229
  },
8230
- uniformPropTypes: {
8230
+ propTypes: {
8231
8231
  amount: { value: 0.5, min: 0, max: 1 }
8232
8232
  },
8233
8233
  fs: fs7,
@@ -8254,7 +8254,7 @@ vec4 sepia_filterColor(vec4 color) {
8254
8254
  return color;
8255
8255
  }
8256
8256
 
8257
- vec4 sepia_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8257
+ vec4 sepia_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8258
8258
  return sepia_filterColor(color);
8259
8259
  }
8260
8260
  `
@@ -8266,7 +8266,7 @@ vec4 sepia_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8266
8266
  uniformTypes: {
8267
8267
  amount: "f32"
8268
8268
  },
8269
- uniformPropTypes: {
8269
+ propTypes: {
8270
8270
  amount: { value: 0.5, min: 0, max: 1 }
8271
8271
  },
8272
8272
  fs: fs8,
@@ -8288,7 +8288,7 @@ vec4 vibrance_filterColor(vec4 color) {
8288
8288
  return color;
8289
8289
  }
8290
8290
 
8291
- vec4 vibrance_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8291
+ vec4 vibrance_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8292
8292
  return vibrance_filterColor(color);
8293
8293
  }
8294
8294
  `
@@ -8297,7 +8297,7 @@ vec4 vibrance_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8297
8297
  props: {},
8298
8298
  uniforms: {},
8299
8299
  name: "vibrance",
8300
- uniformPropTypes: {
8300
+ propTypes: {
8301
8301
  amount: { value: 0, min: -1, max: 1 }
8302
8302
  },
8303
8303
  fs: fs9,
@@ -8312,15 +8312,11 @@ vec4 vibrance_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8312
8312
  float amount;
8313
8313
  } vignette;
8314
8314
 
8315
- vec4 vignette_filterColor(vec4 color, vec2 texCoord) {
8315
+ vec4 vignette_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8316
8316
  float dist = distance(texCoord, vec2(0.5, 0.5));
8317
8317
  float ratio = smoothstep(0.8, vignette.radius * 0.799, dist * (vignette.amount + vignette.radius));
8318
8318
  return color.rgba * ratio + (1.0 - ratio)*vec4(0.0, 0.0, 0.0, 1.0);
8319
8319
  }
8320
-
8321
- vec4 vignette_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8322
- return vignette_filterColor(color, texCoord);
8323
- }
8324
8320
  `
8325
8321
  );
8326
8322
  var vignette = {
@@ -8331,7 +8327,11 @@ vec4 vignette_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8331
8327
  radius: "f32",
8332
8328
  amount: "f32"
8333
8329
  },
8334
- uniformPropTypes: {
8330
+ defaultUniforms: {
8331
+ radius: 0.5,
8332
+ amount: 0.5
8333
+ },
8334
+ propTypes: {
8335
8335
  radius: { value: 0.5, min: 0, max: 1 },
8336
8336
  amount: { value: 0.5, min: 0, max: 1 }
8337
8337
  },
@@ -8399,7 +8399,7 @@ vec4 tiltShift_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8399
8399
  end: "vec2<f32>",
8400
8400
  invert: "i32"
8401
8401
  },
8402
- uniformPropTypes: {
8402
+ propTypes: {
8403
8403
  blurRadius: { value: 15, min: 0, max: 50 },
8404
8404
  gradientRadius: { value: 200, min: 0, max: 400 },
8405
8405
  start: { value: [0, 0] },
@@ -8459,7 +8459,7 @@ vec4 triangleBlur_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8459
8459
  radius: "f32",
8460
8460
  delta: "vec2<f32>"
8461
8461
  },
8462
- uniformPropTypes: {
8462
+ propTypes: {
8463
8463
  radius: { value: 20, min: 0, softMax: 100 },
8464
8464
  delta: { value: [1, 0], private: true }
8465
8465
  },
@@ -8514,7 +8514,7 @@ vec4 zoomBlur_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8514
8514
  center: "vec2<f32>",
8515
8515
  strength: "f32"
8516
8516
  },
8517
- uniformPropTypes: {
8517
+ propTypes: {
8518
8518
  center: { value: [0.5, 0.5] },
8519
8519
  strength: { value: 0.3, min: 0, softMax: 1 }
8520
8520
  },
@@ -8542,7 +8542,7 @@ float pattern(float angle, float scale, vec2 texSize, vec2 texCoord) {
8542
8542
  return (sin(point.x) * sin(point.y)) * 4.0;
8543
8543
  }
8544
8544
 
8545
- vec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8545
+ vec4 colorHalftone_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8546
8546
  float scale = 3.1514 / colorHalftone.size;
8547
8547
  vec3 cmy = 1.0 - color.rgb;
8548
8548
  float k = min(cmy.x, min(cmy.y, cmy.z));
@@ -8571,7 +8571,7 @@ vec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8571
8571
  angle: "f32",
8572
8572
  size: "f32"
8573
8573
  },
8574
- uniformPropTypes: {
8574
+ propTypes: {
8575
8575
  center: { value: [0.5, 0.5] },
8576
8576
  angle: { value: 1.1, softMin: 0, softMax: Math.PI / 2 },
8577
8577
  size: { value: 4, min: 1, softMin: 3, softMax: 20 }
@@ -8601,7 +8601,7 @@ float pattern(vec2 texSize, vec2 texCoord) {
8601
8601
  return (sin(point.x) * sin(point.y)) * 4.0;
8602
8602
  }
8603
8603
 
8604
- vec4 dotScreen_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8604
+ vec4 dotScreen_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
8605
8605
  float average = (color.r + color.g + color.b) / 3.0;
8606
8606
  return vec4(vec3(average * 10.0 - 5.0 + pattern(texSize, texCoord)), color.a);
8607
8607
  }
@@ -8616,7 +8616,7 @@ vec4 dotScreen_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
8616
8616
  angle: "f32",
8617
8617
  size: "f32"
8618
8618
  },
8619
- uniformPropTypes: {
8619
+ propTypes: {
8620
8620
  center: { value: [0.5, 0.5] },
8621
8621
  angle: { value: 1.1, softMin: 0, softMax: Math.PI / 2 },
8622
8622
  size: { value: 3, min: 1, softMin: 3, softMax: 20 }
@@ -8690,7 +8690,7 @@ vec4 edgeWork_sampleColor2(sampler2D source, vec2 texSize, vec2 texCoord) {
8690
8690
  name: "edgeWork",
8691
8691
  dependencies: [random],
8692
8692
  fs: fs16,
8693
- uniformPropTypes: {
8693
+ propTypes: {
8694
8694
  radius: { value: 2, min: 1, softMax: 50 },
8695
8695
  delta: { value: [1, 0], private: true }
8696
8696
  },
@@ -8698,12 +8698,12 @@ vec4 edgeWork_sampleColor2(sampler2D source, vec2 texSize, vec2 texCoord) {
8698
8698
  {
8699
8699
  // @ts-expect-error
8700
8700
  sampler: "edgeWork_sampleColor1",
8701
- uniformPropTypes: { delta: [1, 0] }
8701
+ propTypes: { delta: [1, 0] }
8702
8702
  },
8703
8703
  {
8704
8704
  // @ts-expect-error
8705
8705
  sampler: "edgeWork_sampleColor2",
8706
- uniformPropTypes: { delta: [0, 1] }
8706
+ propTypes: { delta: [0, 1] }
8707
8707
  }
8708
8708
  ]
8709
8709
  };
@@ -8763,7 +8763,7 @@ vec4 hexagonalPixelate_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord
8763
8763
  center: "vec2<f32>",
8764
8764
  scale: "f32"
8765
8765
  },
8766
- uniformPropTypes: {
8766
+ propTypes: {
8767
8767
  center: { value: [0.5, 0.5], hint: "screenspace" },
8768
8768
  scale: { value: 10, min: 1, softMin: 5, softMax: 50 }
8769
8769
  },
@@ -8811,7 +8811,7 @@ vec4 ink_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8811
8811
  uniformTypes: {
8812
8812
  strength: "f32"
8813
8813
  },
8814
- uniformPropTypes: {
8814
+ propTypes: {
8815
8815
  strength: { value: 0.25, min: 0, softMax: 1 }
8816
8816
  },
8817
8817
  passes: [{ sampler: true }]
@@ -8851,7 +8851,7 @@ vec4 magnify_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8851
8851
  borderWidthPixels: "f32",
8852
8852
  borderColor: "vec4<f32>"
8853
8853
  },
8854
- uniformPropTypes: {
8854
+ propTypes: {
8855
8855
  // range 0 to 1
8856
8856
  screenXY: { value: [0, 0] },
8857
8857
  radiusPixels: 200,
@@ -8927,7 +8927,7 @@ vec4 bulgePinch_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8927
8927
  radius: "f32",
8928
8928
  strength: "f32"
8929
8929
  },
8930
- uniformPropTypes: {
8930
+ propTypes: {
8931
8931
  center: { value: [0.5, 0.5] },
8932
8932
  radius: { value: 200, min: 1, softMax: 600 },
8933
8933
  strength: { value: 0.5, min: -1, max: 1 }
@@ -8980,7 +8980,7 @@ vec4 swirl_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
8980
8980
  radius: "f32",
8981
8981
  angle: "f32"
8982
8982
  },
8983
- uniformPropTypes: {
8983
+ propTypes: {
8984
8984
  center: { value: [0.5, 0.5] },
8985
8985
  radius: { value: 200, min: 1, softMax: 600 },
8986
8986
  angle: { value: 3, softMin: -25, softMax: 25 }
@@ -9572,7 +9572,7 @@ vec4 fxaa_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
9572
9572
  `;
9573
9573
  var fxaa = {
9574
9574
  name: "fxaa",
9575
- uniformPropTypes: {},
9575
+ propTypes: {},
9576
9576
  fs: fs23,
9577
9577
  passes: [{ sampler: true }],
9578
9578
  getUniforms: (props) => props
package/dist/dist.min.js CHANGED
@@ -8,20 +8,20 @@
8
8
  logdepth_adjustPosition(gl_Position);
9
9
  #endif
10
10
  `,yn=`#ifdef MODULE_MATERIAL
11
- gl_FragColor = material_filterColor(gl_FragColor);
11
+ fragColor = material_filterColor(fragColor);
12
12
  #endif
13
13
 
14
14
  #ifdef MODULE_LIGHTING
15
- gl_FragColor = lighting_filterColor(gl_FragColor);
15
+ fragColor = lighting_filterColor(fragColor);
16
16
  #endif
17
17
 
18
18
  #ifdef MODULE_FOG
19
- gl_FragColor = fog_filterColor(gl_FragColor);
19
+ fragColor = fog_filterColor(fragColor);
20
20
  #endif
21
21
 
22
22
  #ifdef MODULE_PICKING
23
- gl_FragColor = picking_filterHighlightColor(gl_FragColor);
24
- gl_FragColor = picking_filterPickingColor(gl_FragColor);
23
+ fragColor = picking_filterHighlightColor(fragColor);
24
+ fragColor = picking_filterPickingColor(fragColor);
25
25
  #endif
26
26
 
27
27
  #ifdef MODULE_LOGDEPTH
@@ -30,7 +30,7 @@
30
30
  `;var bi={vertex:bn,fragment:yn},wn=/void\s+main\s*\([^)]*\)\s*\{\n?/,Ln=/}\n?[^{}]*$/,ft=[],me="__LUMA_INJECT_DECLARATIONS__";function Pn(t){let e={vertex:{},fragment:{}};for(let n in t){let r=t[n],i=yi(n);typeof r=="string"&&(r={order:0,injection:r}),e[i][n]=r}return e}function yi(t){let e=t.slice(0,2);switch(e){case"vs":return"vertex";case"fs":return"fragment";default:throw new Error(e)}}function ge(t,e,n,r=!1){let i=e==="vertex";for(let o in n){let a=n[o];a.sort((u,_)=>u.order-_.order),ft.length=a.length;for(let u=0,_=a.length;u<_;++u)ft[u]=a[u].injection;let c=`${ft.join(`
31
31
  `)}
32
32
  `;switch(o){case"vs:#decl":i&&(t=t.replace(me,c));break;case"vs:#main-start":i&&(t=t.replace(wn,u=>u+c));break;case"vs:#main-end":i&&(t=t.replace(Ln,u=>c+u));break;case"fs:#decl":i||(t=t.replace(me,c));break;case"fs:#main-start":i||(t=t.replace(wn,u=>u+c));break;case"fs:#main-end":i||(t=t.replace(Ln,u=>c+u));break;default:t=t.replace(o,u=>u+c)}}return t=t.replace(me,""),r&&(t=t.replace(/\}\s*$/,o=>o+bi[e])),t}function Sn(t){let e={};return W(Array.isArray(t)&&t.length>1),t.forEach(n=>{for(let r in n)e[r]=e[r]?`${e[r]}
33
- ${n[r]}`:n[r]}),e}function Y(t){t.map(e=>Me(e))}function Me(t){if(t.instance)return;Y(t.dependencies||[]);let{uniformPropTypes:e={},deprecations:n=[],inject:r={}}=t,i={normalizedInjections:Pn(r),parsedDeprecations:wi(n)};e&&(i.propValidators=vn(e)),t.instance=i}function kn(t,e,n){Me(t);let r=n||{...t.defaultUniforms};return t.getUniforms?t.getUniforms(e,r):An(e,t.instance?.propValidators,t.name)}function xe(t,e,n){t.deprecations?.forEach(r=>{r.regex?.test(e)&&(r.deprecated?n.deprecated(r.old,r.new)():n.removed(r.old,r.new)())})}function wi(t){return t.forEach(e=>{switch(e.type){case"function":e.regex=new RegExp(`\\b${e.old}\\(`);break;default:e.regex=new RegExp(`${e.type} ${e.old};`)}}),t}function ve(t){Y(t);let e={},n={};Ae({modules:t,level:0,moduleMap:e,moduleDepth:n});let r=Object.keys(n).sort((i,o)=>n[o]-n[i]).map(i=>e[i]);return Y(r),r}function Ae(t){let{modules:e,level:n,moduleMap:r,moduleDepth:i}=t;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(let o of e)r[o.name]=o,(i[o.name]===void 0||i[o.name]<n)&&(i[o.name]=n);for(let o of e)o.dependencies&&Ae({modules:o.dependencies,level:n+1,moduleMap:r,moduleDepth:i})}function Li(t){Y(t);let e={},n={};return Ae({modules:t,level:0,moduleMap:e,moduleDepth:n}),t=Object.keys(n).sort((r,i)=>n[i]-n[r]).map(r=>e[r]),Y(t),t}function Tn(t){return Li(t)}function En(t){switch(t?.gpu.toLowerCase()){case"apple":return`#define APPLE_GPU
33
+ ${n[r]}`:n[r]}),e}function Y(t){t.map(e=>Me(e))}function Me(t){if(t.instance)return;Y(t.dependencies||[]);let{propTypes:e={},deprecations:n=[],inject:r={}}=t,i={normalizedInjections:Pn(r),parsedDeprecations:wi(n)};e&&(i.propValidators=vn(e)),t.instance=i}function kn(t,e,n){Me(t);let r=n||{...t.defaultUniforms};return e&&t.getUniforms?t.getUniforms(e,r):An(e,t.instance?.propValidators,t.name)}function xe(t,e,n){t.deprecations?.forEach(r=>{r.regex?.test(e)&&(r.deprecated?n.deprecated(r.old,r.new)():n.removed(r.old,r.new)())})}function wi(t){return t.forEach(e=>{switch(e.type){case"function":e.regex=new RegExp(`\\b${e.old}\\(`);break;default:e.regex=new RegExp(`${e.type} ${e.old};`)}}),t}function ve(t){Y(t);let e={},n={};Ae({modules:t,level:0,moduleMap:e,moduleDepth:n});let r=Object.keys(n).sort((i,o)=>n[o]-n[i]).map(i=>e[i]);return Y(r),r}function Ae(t){let{modules:e,level:n,moduleMap:r,moduleDepth:i}=t;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(let o of e)r[o.name]=o,(i[o.name]===void 0||i[o.name]<n)&&(i[o.name]=n);for(let o of e)o.dependencies&&Ae({modules:o.dependencies,level:n+1,moduleMap:r,moduleDepth:i})}function Li(t){Y(t);let e={},n={};return Ae({modules:t,level:0,moduleMap:e,moduleDepth:n}),t=Object.keys(n).sort((r,i)=>n[i]-n[r]).map(r=>e[r]),Y(t),t}function Tn(t){return Li(t)}function En(t){switch(t?.gpu.toLowerCase()){case"apple":return`#define APPLE_GPU
34
34
  // Apple optimizes away the calculation necessary for emulated fp64
35
35
  #define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1
36
36
  #define LUMA_FP32_TAN_PRECISION_WORKAROUND 1
@@ -1241,7 +1241,7 @@ vec4 pbr_filterColor(vec4 colorUnused)
1241
1241
  // Binding 0:1 is reserved for shader passes
1242
1242
  @binding(1) @group(0) var<uniform> brightnessContrast : brightnessContrastUniforms;
1243
1243
 
1244
- fn brightnessContrast_filterColor(color: vec4<f32>, texSize: vec2<f32>, texCoords: vec2<f32>) -> vec4<f32> {
1244
+ fn brightnessContrast_filterColor_ext(color: vec4<f32>, texSize: vec2<f32>, texCoords: vec2<f32>) -> vec4<f32> {
1245
1245
  color.rgb += brightnessContrast.brightness;
1246
1246
  if (brightnessContrast.contrast > 0.0) {
1247
1247
  color.rgb = (color.rgb - 0.5) / (1.0 - brightnessContrast.contrast) + 0.5;
@@ -1265,10 +1265,10 @@ vec4 brightnessContrast_filterColor(vec4 color) {
1265
1265
  return color;
1266
1266
  }
1267
1267
 
1268
- vec4 brightnessContrast_filterColor(vec4 color, vec2 texSize, vec2 texCoords) {
1268
+ vec4 brightnessContrast_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1269
1269
  return brightnessContrast_filterColor(color);
1270
1270
  }
1271
- `,Mr={props:{},uniforms:{},name:"brightnessContrast",uniformTypes:{brightness:"f32",contrast:"f32"},uniformPropTypes:{brightness:{format:"f32",value:0,min:-1,max:1},contrast:{format:"f32",value:0,min:-1,max:1}},passes:[{filter:!0}],source:bo,fs:yo};var wo=`uniform denoiseUniforms {
1271
+ `,Mr={props:{},uniforms:{},name:"brightnessContrast",uniformTypes:{brightness:"f32",contrast:"f32"},defaultUniforms:{brightness:0,contrast:0},propTypes:{brightness:{format:"f32",value:0,min:-1,max:1},contrast:{format:"f32",value:0,min:-1,max:1}},passes:[{filter:!0}],source:bo,fs:yo};var wo=`uniform denoiseUniforms {
1272
1272
  float strength;
1273
1273
  } noise;
1274
1274
 
@@ -1290,7 +1290,7 @@ vec4 denoise_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1290
1290
 
1291
1291
  return color / total;
1292
1292
  }
1293
- `,Cr={props:{},uniforms:{},name:"denoise",uniformTypes:{strength:"f32"},uniformPropTypes:{strength:{format:"f32",value:.5,min:0,max:1}},fs:wo,passes:[{sampler:!0},{sampler:!0}]};var Lo=`uniform hueSaturationUniforms {
1293
+ `,Cr={props:{},uniforms:{},name:"denoise",uniformTypes:{strength:"f32"},propTypes:{strength:{format:"f32",value:.5,min:0,max:1}},fs:wo,passes:[{sampler:!0},{sampler:!0}]};var Lo=`uniform hueSaturationUniforms {
1294
1294
  float hue;
1295
1295
  float saturation;
1296
1296
  } hueSaturation;
@@ -1318,10 +1318,10 @@ vec4 hueSaturation_filterColor(vec4 color) {
1318
1318
  return color;
1319
1319
  }
1320
1320
 
1321
- vec4 hueSaturation_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1321
+ vec4 hueSaturation_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1322
1322
  return hueSaturation_filterColor(color);
1323
1323
  }
1324
- `,Rr={props:{},uniforms:{},name:"hueSaturation",fs:Lo,uniformTypes:{hue:"f32",saturation:"f32"},uniformPropTypes:{hue:{value:0,min:-1,max:1},saturation:{value:0,min:-1,max:1}},passes:[{filter:!0}]};var Po=`uniform noiseUniforms {
1324
+ `,Rr={props:{},uniforms:{},name:"hueSaturation",fs:Lo,uniformTypes:{hue:"f32",saturation:"f32"},propTypes:{hue:{value:0,min:-1,max:1},saturation:{value:0,min:-1,max:1}},passes:[{filter:!0}]};var Po=`uniform noiseUniforms {
1325
1325
  float amount;
1326
1326
  } noise;
1327
1327
 
@@ -1329,18 +1329,14 @@ float rand(vec2 co) {
1329
1329
  return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
1330
1330
  }
1331
1331
 
1332
- vec4 noise_filterColor(vec4 color, vec2 texCoord) {
1332
+ vec4 noise_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1333
1333
  float diff = (rand(texCoord) - 0.5) * noise.amount;
1334
1334
  color.r += diff;
1335
1335
  color.g += diff;
1336
1336
  color.b += diff;
1337
1337
  return color;
1338
1338
  }
1339
-
1340
- vec4 noise_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1341
- return noise_filterColor(color, texCoord);
1342
- }
1343
- `,Or={props:{},uniforms:{},name:"noise",uniformTypes:{amount:"f32"},uniformPropTypes:{amount:{value:.5,min:0,max:1}},fs:Po,passes:[{filter:!0}]};var So=`uniform sepiaUniforms {
1339
+ `,Or={props:{},uniforms:{},name:"noise",uniformTypes:{amount:"f32"},propTypes:{amount:{value:.5,min:0,max:1}},fs:Po,passes:[{filter:!0}]};var So=`uniform sepiaUniforms {
1344
1340
  float amount;
1345
1341
  } sepia;
1346
1342
 
@@ -1357,10 +1353,10 @@ vec4 sepia_filterColor(vec4 color) {
1357
1353
  return color;
1358
1354
  }
1359
1355
 
1360
- vec4 sepia_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1356
+ vec4 sepia_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1361
1357
  return sepia_filterColor(color);
1362
1358
  }
1363
- `,Ur={props:{},uniforms:{},name:"sepia",uniformTypes:{amount:"f32"},uniformPropTypes:{amount:{value:.5,min:0,max:1}},fs:So,passes:[{filter:!0}]};var ko=`uniform vibranceUniforms {
1359
+ `,Ur={props:{},uniforms:{},name:"sepia",uniformTypes:{amount:"f32"},propTypes:{amount:{value:.5,min:0,max:1}},fs:So,passes:[{filter:!0}]};var ko=`uniform vibranceUniforms {
1364
1360
  float amount;
1365
1361
  } vibrance;
1366
1362
 
@@ -1372,24 +1368,20 @@ vec4 vibrance_filterColor(vec4 color) {
1372
1368
  return color;
1373
1369
  }
1374
1370
 
1375
- vec4 vibrance_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1371
+ vec4 vibrance_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1376
1372
  return vibrance_filterColor(color);
1377
1373
  }
1378
- `,zr={props:{},uniforms:{},name:"vibrance",uniformPropTypes:{amount:{value:0,min:-1,max:1}},fs:ko,passes:[{filter:!0}]};var To=`uniform vignetteUniforms {
1374
+ `,zr={props:{},uniforms:{},name:"vibrance",propTypes:{amount:{value:0,min:-1,max:1}},fs:ko,passes:[{filter:!0}]};var To=`uniform vignetteUniforms {
1379
1375
  float radius;
1380
1376
  float amount;
1381
1377
  } vignette;
1382
1378
 
1383
- vec4 vignette_filterColor(vec4 color, vec2 texCoord) {
1379
+ vec4 vignette_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1384
1380
  float dist = distance(texCoord, vec2(0.5, 0.5));
1385
1381
  float ratio = smoothstep(0.8, vignette.radius * 0.799, dist * (vignette.amount + vignette.radius));
1386
1382
  return color.rgba * ratio + (1.0 - ratio)*vec4(0.0, 0.0, 0.0, 1.0);
1387
1383
  }
1388
-
1389
- vec4 vignette_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1390
- return vignette_filterColor(color, texCoord);
1391
- }
1392
- `,Dr={props:{},uniforms:{},name:"vignette",uniformTypes:{radius:"f32",amount:"f32"},uniformPropTypes:{radius:{value:.5,min:0,max:1},amount:{value:.5,min:0,max:1}},passes:[{filter:!0}],fs:To};var Eo=`uniform tiltShiftUniforms {
1384
+ `,Dr={props:{},uniforms:{},name:"vignette",uniformTypes:{radius:"f32",amount:"f32"},defaultUniforms:{radius:.5,amount:.5},propTypes:{radius:{value:.5,min:0,max:1},amount:{value:.5,min:0,max:1}},passes:[{filter:!0}],fs:To};var Eo=`uniform tiltShiftUniforms {
1393
1385
  float blurRadius;
1394
1386
  float gradientRadius;
1395
1387
  vec2 start;
@@ -1432,7 +1424,7 @@ vec4 tiltShift_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1432
1424
 
1433
1425
  return color;
1434
1426
  }
1435
- `,Br={props:{},uniforms:{},name:"tiltShift",dependencies:[Q],uniformTypes:{blurRadius:"f32",gradientRadius:"f32",start:"vec2<f32>",end:"vec2<f32>",invert:"i32"},uniformPropTypes:{blurRadius:{value:15,min:0,max:50},gradientRadius:{value:200,min:0,max:400},start:{value:[0,0]},end:{value:[1,1]},invert:{value:0,private:!0}},passes:[{sampler:!0,uniforms:{invert:0}},{sampler:!0,uniforms:{invert:1}}],fs:Eo};var No=`uniform triangleBlurUniforms {
1427
+ `,Br={props:{},uniforms:{},name:"tiltShift",dependencies:[Q],uniformTypes:{blurRadius:"f32",gradientRadius:"f32",start:"vec2<f32>",end:"vec2<f32>",invert:"i32"},propTypes:{blurRadius:{value:15,min:0,max:50},gradientRadius:{value:200,min:0,max:400},start:{value:[0,0]},end:{value:[1,1]},invert:{value:0,private:!0}},passes:[{sampler:!0,uniforms:{invert:0}},{sampler:!0,uniforms:{invert:1}}],fs:Eo};var No=`uniform triangleBlurUniforms {
1436
1428
  float radius;
1437
1429
  vec2 delta;
1438
1430
  } triangleBlur;
@@ -1465,7 +1457,7 @@ vec4 triangleBlur_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1465
1457
 
1466
1458
  return color;
1467
1459
  }
1468
- `,Xr={props:{},uniforms:{},name:"triangleBlur",uniformTypes:{radius:"f32",delta:"vec2<f32>"},uniformPropTypes:{radius:{value:20,min:0,softMax:100},delta:{value:[1,0],private:!0}},fs:No,dependencies:[Q],passes:[{sampler:!0,uniforms:{delta:[1,0]}},{sampler:!0,uniforms:{delta:[0,1]}}]};var Io=`
1460
+ `,Xr={props:{},uniforms:{},name:"triangleBlur",uniformTypes:{radius:"f32",delta:"vec2<f32>"},propTypes:{radius:{value:20,min:0,softMax:100},delta:{value:[1,0],private:!0}},fs:No,dependencies:[Q],passes:[{sampler:!0,uniforms:{delta:[1,0]}},{sampler:!0,uniforms:{delta:[0,1]}}]};var Io=`
1469
1461
  uniform zoomBlurUniforms {
1470
1462
  vec2 center;
1471
1463
  float strength;
@@ -1498,7 +1490,7 @@ vec4 zoomBlur_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1498
1490
 
1499
1491
  return color;
1500
1492
  }
1501
- `,Yr={props:{},uniforms:{},name:"zoomBlur",uniformTypes:{center:"vec2<f32>",strength:"f32"},uniformPropTypes:{center:{value:[.5,.5]},strength:{value:.3,min:0,softMax:1}},fs:Io,dependencies:[Q],passes:[{sampler:!0}]};var Fo=`uniform colorHalftoneUniforms {
1493
+ `,Yr={props:{},uniforms:{},name:"zoomBlur",uniformTypes:{center:"vec2<f32>",strength:"f32"},propTypes:{center:{value:[.5,.5]},strength:{value:.3,min:0,softMax:1}},fs:Io,dependencies:[Q],passes:[{sampler:!0}]};var Fo=`uniform colorHalftoneUniforms {
1502
1494
  vec2 center;
1503
1495
  float angle;
1504
1496
  float size;
@@ -1514,7 +1506,7 @@ float pattern(float angle, float scale, vec2 texSize, vec2 texCoord) {
1514
1506
  return (sin(point.x) * sin(point.y)) * 4.0;
1515
1507
  }
1516
1508
 
1517
- vec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1509
+ vec4 colorHalftone_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1518
1510
  float scale = 3.1514 / colorHalftone.size;
1519
1511
  vec3 cmy = 1.0 - color.rgb;
1520
1512
  float k = min(cmy.x, min(cmy.y, cmy.z));
@@ -1532,7 +1524,7 @@ vec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1532
1524
  k = clamp(k * 10.0 - 5.0 + pattern(colorHalftone.angle + 0.78539, scale, texSize, texCoord), 0.0, 1.0);
1533
1525
  return vec4(1.0 - cmy - k, color.a);
1534
1526
  }
1535
- `,Qr={props:{},uniforms:{},name:"colorHalftone",uniformTypes:{center:"vec2<f32>",angle:"f32",size:"f32"},uniformPropTypes:{center:{value:[.5,.5]},angle:{value:1.1,softMin:0,softMax:Math.PI/2},size:{value:4,min:1,softMin:3,softMax:20}},fs:Fo,passes:[{filter:!0}]};var Mo=`uniform dotScreenUniforms {
1527
+ `,Qr={props:{},uniforms:{},name:"colorHalftone",uniformTypes:{center:"vec2<f32>",angle:"f32",size:"f32"},propTypes:{center:{value:[.5,.5]},angle:{value:1.1,softMin:0,softMax:Math.PI/2},size:{value:4,min:1,softMin:3,softMax:20}},fs:Fo,passes:[{filter:!0}]};var Mo=`uniform dotScreenUniforms {
1536
1528
  vec2 center;
1537
1529
  float angle;
1538
1530
  float size;
@@ -1550,11 +1542,11 @@ float pattern(vec2 texSize, vec2 texCoord) {
1550
1542
  return (sin(point.x) * sin(point.y)) * 4.0;
1551
1543
  }
1552
1544
 
1553
- vec4 dotScreen_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {
1545
+ vec4 dotScreen_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {
1554
1546
  float average = (color.r + color.g + color.b) / 3.0;
1555
1547
  return vec4(vec3(average * 10.0 - 5.0 + pattern(texSize, texCoord)), color.a);
1556
1548
  }
1557
- `,Gr={props:{},uniforms:{},name:"dotScreen",uniformTypes:{center:"vec2<f32>",angle:"f32",size:"f32"},uniformPropTypes:{center:{value:[.5,.5]},angle:{value:1.1,softMin:0,softMax:Math.PI/2},size:{value:3,min:1,softMin:3,softMax:20}},fs:Mo,passes:[{filter:!0}]};var Co=`uniform edgeWorkUniforms {
1549
+ `,Gr={props:{},uniforms:{},name:"dotScreen",uniformTypes:{center:"vec2<f32>",angle:"f32",size:"f32"},propTypes:{center:{value:[.5,.5]},angle:{value:1.1,softMin:0,softMax:Math.PI/2},size:{value:3,min:1,softMin:3,softMax:20}},fs:Mo,passes:[{filter:!0}]};var Co=`uniform edgeWorkUniforms {
1558
1550
  float radius;
1559
1551
  vec2 delta;
1560
1552
  } edgeWork;
@@ -1608,7 +1600,7 @@ vec4 edgeWork_sampleColor2(sampler2D source, vec2 texSize, vec2 texCoord) {
1608
1600
  float c = clamp(10000.0 * (color.y / total.y - color.x / total.x) + 0.5, 0.0, 1.0);
1609
1601
  return vec4(c, c, c, 1.0);
1610
1602
  }
1611
- `,qr={props:{},uniforms:{},name:"edgeWork",dependencies:[Q],fs:Co,uniformPropTypes:{radius:{value:2,min:1,softMax:50},delta:{value:[1,0],private:!0}},passes:[{sampler:"edgeWork_sampleColor1",uniformPropTypes:{delta:[1,0]}},{sampler:"edgeWork_sampleColor2",uniformPropTypes:{delta:[0,1]}}]};var Ro=`uniform hexagonalPixelateUniforms {
1603
+ `,qr={props:{},uniforms:{},name:"edgeWork",dependencies:[Q],fs:Co,propTypes:{radius:{value:2,min:1,softMax:50},delta:{value:[1,0],private:!0}},passes:[{sampler:"edgeWork_sampleColor1",propTypes:{delta:[1,0]}},{sampler:"edgeWork_sampleColor2",propTypes:{delta:[0,1]}}]};var Ro=`uniform hexagonalPixelateUniforms {
1612
1604
  vec2 center;
1613
1605
  float scale;
1614
1606
  } hexagonalPixelate;
@@ -1650,7 +1642,7 @@ vec4 hexagonalPixelate_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord
1650
1642
 
1651
1643
  return texture(source, choice + hexagonalPixelate.center);
1652
1644
  }
1653
- `,Hr={props:{},uniforms:{},name:"hexagonalPixelate",uniformTypes:{center:"vec2<f32>",scale:"f32"},uniformPropTypes:{center:{value:[.5,.5],hint:"screenspace"},scale:{value:10,min:1,softMin:5,softMax:50}},fs:Ro,passes:[{sampler:!0}]};var Oo=`uniform inkUniforms {
1645
+ `,Hr={props:{},uniforms:{},name:"hexagonalPixelate",uniformTypes:{center:"vec2<f32>",scale:"f32"},propTypes:{center:{value:[.5,.5],hint:"screenspace"},scale:{value:10,min:1,softMin:5,softMax:50}},fs:Ro,passes:[{sampler:!0}]};var Oo=`uniform inkUniforms {
1654
1646
  float strength;
1655
1647
  } ink;
1656
1648
 
@@ -1677,7 +1669,7 @@ vec4 ink_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1677
1669
  float power = ink.strength * ink.strength * ink.strength * ink.strength * ink.strength;
1678
1670
  return vec4(color.rgb - dot(edge, edge) * power * 100000.0, color.a);
1679
1671
  }
1680
- `,Vr={props:{},uniforms:{},name:"ink",fs:Oo,uniformTypes:{strength:"f32"},uniformPropTypes:{strength:{value:.25,min:0,softMax:1}},passes:[{sampler:!0}]};var Uo=`uniform magnifyUniforms {
1672
+ `,Vr={props:{},uniforms:{},name:"ink",fs:Oo,uniformTypes:{strength:"f32"},propTypes:{strength:{value:.25,min:0,softMax:1}},passes:[{sampler:!0}]};var Uo=`uniform magnifyUniforms {
1681
1673
  vec2 screenXY;
1682
1674
  float radiusPixels;
1683
1675
  float zoom;
@@ -1697,7 +1689,7 @@ vec4 magnify_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1697
1689
  }
1698
1690
  return texture(source, texCoord);
1699
1691
  }
1700
- `,Wr={name:"magnify",uniformTypes:{screenXY:"vec2<f32>",radiusPixels:"f32",zoom:"f32",borderWidthPixels:"f32",borderColor:"vec4<f32>"},uniformPropTypes:{screenXY:{value:[0,0]},radiusPixels:200,zoom:2,borderWidthPixels:0,borderColor:{value:[255,255,255,255]}},fs:Uo,passes:[{sampler:!0}]};var zo=`vec4 warp_sampleColor(sampler2D source, vec2 texSize, vec2 coord) {
1692
+ `,Wr={name:"magnify",uniformTypes:{screenXY:"vec2<f32>",radiusPixels:"f32",zoom:"f32",borderWidthPixels:"f32",borderColor:"vec4<f32>"},propTypes:{screenXY:{value:[0,0]},radiusPixels:200,zoom:2,borderWidthPixels:0,borderColor:{value:[255,255,255,255]}},fs:Uo,passes:[{sampler:!0}]};var zo=`vec4 warp_sampleColor(sampler2D source, vec2 texSize, vec2 coord) {
1701
1693
  vec4 color = texture(source, coord / texSize);
1702
1694
  vec2 clampedCoord = clamp(coord, vec2(0.0), texSize);
1703
1695
  if (coord != clampedCoord) {
@@ -1734,7 +1726,7 @@ vec4 bulgePinch_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1734
1726
 
1735
1727
  return warp_sampleColor(source, texSize, coord);
1736
1728
  }
1737
- `,jr={props:{},uniforms:{},name:"bulgePinch",dependencies:[_e],fs:Do,uniformTypes:{center:"vec2<f32>",radius:"f32",strength:"f32"},uniformPropTypes:{center:{value:[.5,.5]},radius:{value:200,min:1,softMax:600},strength:{value:.5,min:-1,max:1}},passes:[{sampler:!0}]};var Bo=`uniform swirlUniforms {
1729
+ `,jr={props:{},uniforms:{},name:"bulgePinch",dependencies:[_e],fs:Do,uniformTypes:{center:"vec2<f32>",radius:"f32",strength:"f32"},propTypes:{center:{value:[.5,.5]},radius:{value:200,min:1,softMax:600},strength:{value:.5,min:-1,max:1}},passes:[{sampler:!0}]};var Bo=`uniform swirlUniforms {
1738
1730
  float radius;
1739
1731
  float angle;
1740
1732
  vec2 center;
@@ -1763,7 +1755,7 @@ vec4 swirl_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
1763
1755
 
1764
1756
  return warp_sampleColor(source, texSize, coord);
1765
1757
  }
1766
- `,$r={props:{},uniforms:{},name:"swirl",dependencies:[_e],fs:Bo,uniformTypes:{center:"vec2<f32>",radius:"f32",angle:"f32"},uniformPropTypes:{center:{value:[.5,.5]},radius:{value:200,min:1,softMax:600},angle:{value:3,softMin:-25,softMax:25}},passes:[{sampler:!0}]};var Xo=`
1758
+ `,$r={props:{},uniforms:{},name:"swirl",dependencies:[_e],fs:Bo,uniformTypes:{center:"vec2<f32>",radius:"f32",angle:"f32"},propTypes:{center:{value:[.5,.5]},radius:{value:200,min:1,softMax:600},angle:{value:3,softMin:-25,softMax:25}},passes:[{sampler:!0}]};var Xo=`
1767
1759
  #define FXAA_QUALITY_PRESET 29
1768
1760
 
1769
1761
  #if (FXAA_QUALITY_PRESET == 10)
@@ -2343,7 +2335,7 @@ vec4 fxaa_sampleColor(sampler2D source, vec2 texSize, vec2 texCoord) {
2343
2335
  fxaa_QualityEdgeThresholdMin
2344
2336
  );
2345
2337
  }
2346
- `,Kr={name:"fxaa",uniformPropTypes:{},fs:Xo,passes:[{sampler:!0}],getUniforms:t=>t};var Zr=`uniform float ONE;
2338
+ `,Kr={name:"fxaa",propTypes:{},fs:Xo,passes:[{sampler:!0}],getUniforms:t=>t};var Zr=`uniform float ONE;
2347
2339
 
2348
2340
  /*
2349
2341
  About LUMA_FP64_CODE_ELIMINATION_WORKAROUND