瀏覽代碼

Update Speedy Vision

customisations
alemart 1 年之前
父節點
當前提交
ad3a20ada4
共有 3 個檔案被更改,包括 29 行新增29 行删除
  1. 24
    24
      dist/martins.js
  2. 3
    3
      dist/martins.min.js
  3. 2
    2
      package-lock.json

+ 24
- 24
dist/martins.js 查看文件

@@ -5,7 +5,7 @@
5 5
  * https://github.com/alemart/martins-js
6 6
  *
7 7
  * @license AGPL-3.0-only
8
- * Date: 2024-01-09T17:56:51.419Z
8
+ * Date: 2024-01-10T13:47:03.478Z
9 9
  */
10 10
 (function webpackUniversalModuleDefinition(root, factory) {
11 11
 	if(typeof exports === 'object' && typeof module === 'object')
@@ -30,7 +30,7 @@ return /******/ (() => { // webpackBootstrap
30 30
  * https://github.com/alemart/speedy-vision
31 31
  *
32 32
  * @license Apache-2.0
33
- * Date: 2024-01-06T03:16:16.840Z
33
+ * Date: 2024-01-10T13:44:25.122Z
34 34
  */
35 35
 (function webpackUniversalModuleDefinition(root, factory) {
36 36
 	if(true)
@@ -4729,7 +4729,7 @@ module.exports = "@include \"keypoints.glsl\"\n@include \"int32.glsl\"\n#if !def
4729 4729
 /***/ 2277:
4730 4730
 /***/ ((module) => {
4731 4731
 
4732
-module.exports = "@include \"pyramids.glsl\"\n@include \"float16.glsl\"\n@include \"filters.glsl\"\n#if !defined(USE_LAPLACIAN)\n#error Undefined USE_LAPLACIAN\n#endif\nuniform sampler2D corners;\nuniform sampler2D pyramid;\nuniform float lodStep;\n#if USE_LAPLACIAN\nuniform sampler2D pyrLaplacian;\n#endif\nvoid main()\n{\nivec2 thread = threadLocation();\nvec4 pixel = threadPixel(corners);\nfloat score = decodeFloat16(pixel.rb);\nfloat myEncodedLod = pixel.a;\nfloat lod = decodeLod(myEncodedLod);\nfloat lodPlus = lod + lodStep;\nfloat lodMinus = lod - lodStep;\nfloat pot = exp2(lod);\nfloat potPlus = exp2(lodPlus);\nfloat potMinus = exp2(lodMinus);\ncolor = pixel;\nif(score == 0.0f)\nreturn;\n#define P(p,u,v) textureLod(corners, texCoord + (p) * vec2((u),(v)) / texSize, 0.0f)\nvec4 pix[18];\n#define D(u,v) P(potMinus,(u),(v))\npix[0] = D(-1,-1); pix[1] = D(0,-1); pix[2] = D(1,-1);\npix[3] = D(-1,0); pix[4] = D(0,0); pix[5] = D(1,0);\npix[6] = D(-1,1); pix[7] = D(0,1); pix[8] = D(1,1);\n#define U(u,v) P(potPlus,(u),(v))\npix[9] = U(-1,-1); pix[10] = U(0,-1); pix[11] = U(1,-1);\npix[12] = U(-1,0); pix[13] = U(0,0); pix[14] = U(1,0);\npix[15] = U(-1,1); pix[16] = U(0,1); pix[17] = U(1,1);\nfloat scores[18];\n#define C(j) decodeFloat16(pix[j].rb)\nscores[0] = C(0); scores[1] = C(1); scores[2] = C(2);\nscores[3] = C(3); scores[4] = C(4); scores[5] = C(5);\nscores[6] = C(6); scores[7] = C(7); scores[8] = C(8);\nscores[9] = C(9); scores[10] = C(10); scores[11] = C(11);\nscores[12] = C(12); scores[13] = C(13); scores[14] = C(14);\nscores[15] = C(15); scores[16] = C(16); scores[17] = C(17);\nfloat lods[18];\n#define E(j) decodeLod(pix[j].a)\nlods[0] = E(0); lods[1] = E(1); lods[2] = E(2);\nlods[3] = E(3); lods[4] = E(4); lods[5] = E(5);\nlods[6] = E(6); lods[7] = E(7); lods[8] = E(8);\nlods[9] = E(9); lods[10] = E(10); lods[11] = E(11);\nlods[12] = E(12); lods[13] = E(13); lods[14] = E(14);\nlods[15] = E(15); lods[16] = E(16); lods[17] = E(17);\n#if USE_LAPLACIAN\n#define L(p,u,v) textureLod(pyrLaplacian, texCoord + (p) * vec2((u),(v)) / texSize, 0.0f)\nmat3 strengths[2] = mat3[2](mat3(\n#define Lm(u,v) abs(decodeFloat16(L(potMinus,(u),(v)).xy))\nLm(-1,-1), Lm(0,-1), Lm(1,-1),\nLm(-1,0), Lm(0,0), Lm(1,0),\nLm(-1,1), Lm(0,1), Lm(1,1)\n), mat3(\n#define Lp(u,v) abs(decodeFloat16(L(potPlus,(u),(v)).zw))\nLp(-1,-1), Lp(0,-1), Lp(1,-1),\nLp(-1,0), Lp(0,0), Lp(1,0),\nLp(-1,1), Lp(0,1), Lp(1,1)\n));\nfloat myStrength = abs(laplacian(pyramid, vec2(thread), lod));\n#else\n#define L(u,v) (((v)+1)*3 + ((u)+1))\nmat3 strengths[2] = mat3[2](mat3(\n#define Lm(u,v) scores[L((u),(v))]\nLm(-1,-1), Lm(0,-1), Lm(1,-1),\nLm(-1,0), Lm(0,0), Lm(1,0),\nLm(-1,1), Lm(0,1), Lm(1,1)\n), mat3(\n#define Lp(u,v) scores[9 + L((u),(v))]\nLp(-1,-1), Lp(0,-1), Lp(1,-1),\nLp(-1,0), Lp(0,0), Lp(1,0),\nLp(-1,1), Lp(0,1), Lp(1,1)\n));\nfloat myStrength = score;\n#endif\n#define B(j,lod) float(isSameLod(lods[j], (lod))) * float(scores[j] > 0.0f)\nmat3 nearLod[2] = mat3[2](mat3(\n#define Bm(j) B((j), lodMinus)\nBm(0), Bm(1), Bm(2),\nBm(3), Bm(4), Bm(5),\nBm(6), Bm(7), Bm(8)\n), mat3(\n#define Bp(j) B((j), lodPlus)\nBp(9), Bp(10), Bp(11),\nBp(12), Bp(13), Bp(14),\nBp(15), Bp(16), Bp(17)\n));\nmat3 upStrengths = matrixCompMult(strengths[1], nearLod[1]);\nmat3 downStrengths = matrixCompMult(strengths[0], nearLod[0]);\nvec3 maxUpStrength3 = max(upStrengths[0], max(upStrengths[1], upStrengths[2]));\nvec3 maxDownStrength3 = max(downStrengths[0], max(downStrengths[1], downStrengths[2]));\nvec3 maxStrength3 = max(maxUpStrength3, maxDownStrength3);\nfloat maxStrength = max(maxStrength3.x, max(maxStrength3.y, maxStrength3.z));\ncolor.rb = encodeFloat16(score * step(maxStrength, myStrength));\n}"
4732
+module.exports = "@include \"pyramids.glsl\"\n@include \"float16.glsl\"\n@include \"filters.glsl\"\n#if !defined(USE_LAPLACIAN)\n#error Undefined USE_LAPLACIAN\n#endif\nuniform sampler2D corners;\nuniform sampler2D pyramid;\nuniform float lodStep;\n#if USE_LAPLACIAN\nuniform sampler2D pyrLaplacian;\n#endif\nvoid main()\n{\nivec2 thread = threadLocation();\nvec4 pixel = threadPixel(corners);\nfloat score = decodeFloat16(pixel.rb);\nfloat myEncodedLod = pixel.a;\nfloat lod = decodeLod(myEncodedLod);\nfloat lodPlus = lod + lodStep;\nfloat lodMinus = lod - lodStep;\nfloat pot = exp2(lod);\nfloat potPlus = exp2(lodPlus);\nfloat potMinus = exp2(lodMinus);\ncolor = pixel;\nif(score == 0.0f)\nreturn;\n#define P(p,u,v) textureLod(corners, texCoord + (p) * vec2((u),(v)) / texSize, 0.0f)\nvec4 pix[18];\n#define D(u,v) P(potMinus,(u),(v))\npix[0] = D(-1,-1); pix[1] = D(0,-1); pix[2] = D(1,-1);\npix[3] = D(-1,0); pix[4] = D(0,0); pix[5] = D(1,0);\npix[6] = D(-1,1); pix[7] = D(0,1); pix[8] = D(1,1);\n#define U(u,v) P(potPlus,(u),(v))\npix[9] = U(-1,-1); pix[10] = U(0,-1); pix[11] = U(1,-1);\npix[12] = U(-1,0); pix[13] = U(0,0); pix[14] = U(1,0);\npix[15] = U(-1,1); pix[16] = U(0,1); pix[17] = U(1,1);\nfloat scores[18];\n#define C(j) decodeFloat16(pix[j].rb)\nscores[0] = C(0); scores[1] = C(1); scores[2] = C(2);\nscores[3] = C(3); scores[4] = C(4); scores[5] = C(5);\nscores[6] = C(6); scores[7] = C(7); scores[8] = C(8);\nscores[9] = C(9); scores[10] = C(10); scores[11] = C(11);\nscores[12] = C(12); scores[13] = C(13); scores[14] = C(14);\nscores[15] = C(15); scores[16] = C(16); scores[17] = C(17);\nfloat lods[18];\n#define E(j) decodeLod(pix[j].a)\nlods[0] = E(0); lods[1] = E(1); lods[2] = E(2);\nlods[3] = E(3); lods[4] = E(4); lods[5] = E(5);\nlods[6] = E(6); lods[7] = E(7); lods[8] = E(8);\nlods[9] = E(9); lods[10] = E(10); lods[11] = E(11);\nlods[12] = E(12); lods[13] = E(13); lods[14] = E(14);\nlods[15] = E(15); lods[16] = E(16); lods[17] = E(17);\n#if USE_LAPLACIAN\n#define L(p,u,v) textureLod(pyrLaplacian, texCoord + (p) * vec2((u),(v)) / texSize, 0.0f)\nmat3 strengths[2];\nstrengths[0] = mat3(\n#define Lm(u,v) abs(decodeFloat16(L(potMinus,(u),(v)).xy))\nLm(-1,-1), Lm(0,-1), Lm(1,-1),\nLm(-1,0), Lm(0,0), Lm(1,0),\nLm(-1,1), Lm(0,1), Lm(1,1)\n);\nstrengths[1] = mat3(\n#define Lp(u,v) abs(decodeFloat16(L(potPlus,(u),(v)).zw))\nLp(-1,-1), Lp(0,-1), Lp(1,-1),\nLp(-1,0), Lp(0,0), Lp(1,0),\nLp(-1,1), Lp(0,1), Lp(1,1)\n);\nfloat myStrength = abs(laplacian(pyramid, vec2(thread), lod));\n#else\n#define L(u,v) (((v)+1)*3 + ((u)+1))\nmat3 strengths[2];\nstrengths[0] = mat3(\n#define Lm(u,v) scores[L((u),(v))]\nLm(-1,-1), Lm(0,-1), Lm(1,-1),\nLm(-1,0), Lm(0,0), Lm(1,0),\nLm(-1,1), Lm(0,1), Lm(1,1)\n);\nstrengths[1] = mat3(\n#define Lp(u,v) scores[9 + L((u),(v))]\nLp(-1,-1), Lp(0,-1), Lp(1,-1),\nLp(-1,0), Lp(0,0), Lp(1,0),\nLp(-1,1), Lp(0,1), Lp(1,1)\n);\nfloat myStrength = score;\n#endif\n#define B(j,lod) float(isSameLod(lods[j], (lod))) * float(scores[j] > 0.0f)\nmat3 nearLod[2];\nnearLod[0] = mat3(\n#define Bm(j) B((j), lodMinus)\nBm(0), Bm(1), Bm(2),\nBm(3), Bm(4), Bm(5),\nBm(6), Bm(7), Bm(8)\n);\nnearLod[1] = mat3(\n#define Bp(j) B((j), lodPlus)\nBp(9), Bp(10), Bp(11),\nBp(12), Bp(13), Bp(14),\nBp(15), Bp(16), Bp(17)\n);\nmat3 upStrengths = matrixCompMult(strengths[1], nearLod[1]);\nmat3 downStrengths = matrixCompMult(strengths[0], nearLod[0]);\nvec3 maxUpStrength3 = max(upStrengths[0], max(upStrengths[1], upStrengths[2]));\nvec3 maxDownStrength3 = max(downStrengths[0], max(downStrengths[1], downStrengths[2]));\nvec3 maxStrength3 = max(maxUpStrength3, maxDownStrength3);\nfloat maxStrength = max(maxStrength3.x, max(maxStrength3.y, maxStrength3.z));\ncolor.rb = encodeFloat16(score * step(maxStrength, myStrength));\n}"
4733 4733
 
4734 4734
 /***/ }),
4735 4735
 
@@ -5410,7 +5410,7 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
5410 5410
 /******/ 	var __webpack_module_cache__ = {};
5411 5411
 /******/ 	
5412 5412
 /******/ 	// The require function
5413
-/******/ 	function __nested_webpack_require_312538__(moduleId) {
5413
+/******/ 	function __nested_webpack_require_312600__(moduleId) {
5414 5414
 /******/ 		// Check if module is in cache
5415 5415
 /******/ 		var cachedModule = __webpack_module_cache__[moduleId];
5416 5416
 /******/ 		if (cachedModule !== undefined) {
@@ -5424,7 +5424,7 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
5424 5424
 /******/ 		};
5425 5425
 /******/ 	
5426 5426
 /******/ 		// Execute the module function
5427
-/******/ 		__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_312538__);
5427
+/******/ 		__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_312600__);
5428 5428
 /******/ 	
5429 5429
 /******/ 		// Return the exports of the module
5430 5430
 /******/ 		return module.exports;
@@ -5434,9 +5434,9 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
5434 5434
 /******/ 	/* webpack/runtime/define property getters */
5435 5435
 /******/ 	(() => {
5436 5436
 /******/ 		// define getter functions for harmony exports
5437
-/******/ 		__nested_webpack_require_312538__.d = (exports, definition) => {
5437
+/******/ 		__nested_webpack_require_312600__.d = (exports, definition) => {
5438 5438
 /******/ 			for(var key in definition) {
5439
-/******/ 				if(__nested_webpack_require_312538__.o(definition, key) && !__nested_webpack_require_312538__.o(exports, key)) {
5439
+/******/ 				if(__nested_webpack_require_312600__.o(definition, key) && !__nested_webpack_require_312600__.o(exports, key)) {
5440 5440
 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
5441 5441
 /******/ 				}
5442 5442
 /******/ 			}
@@ -5445,13 +5445,13 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
5445 5445
 /******/ 	
5446 5446
 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
5447 5447
 /******/ 	(() => {
5448
-/******/ 		__nested_webpack_require_312538__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
5448
+/******/ 		__nested_webpack_require_312600__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
5449 5449
 /******/ 	})();
5450 5450
 /******/ 	
5451 5451
 /******/ 	/* webpack/runtime/make namespace object */
5452 5452
 /******/ 	(() => {
5453 5453
 /******/ 		// define __esModule on exports
5454
-/******/ 		__nested_webpack_require_312538__.r = (exports) => {
5454
+/******/ 		__nested_webpack_require_312600__.r = (exports) => {
5455 5455
 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
5456 5456
 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5457 5457
 /******/ 			}
@@ -5466,18 +5466,18 @@ var __webpack_exports__ = {};
5466 5466
 "use strict";
5467 5467
 
5468 5468
 // EXPORTS
5469
-__nested_webpack_require_312538__.d(__webpack_exports__, {
5469
+__nested_webpack_require_312600__.d(__webpack_exports__, {
5470 5470
   "default": () => (/* binding */ Speedy)
5471 5471
 });
5472 5472
 
5473 5473
 // EXTERNAL MODULE: ./src/gpu/speedy-gl.js
5474
-var speedy_gl = __nested_webpack_require_312538__(7905);
5474
+var speedy_gl = __nested_webpack_require_312600__(7905);
5475 5475
 // EXTERNAL MODULE: ./src/utils/utils.js
5476
-var utils = __nested_webpack_require_312538__(5484);
5476
+var utils = __nested_webpack_require_312600__(5484);
5477 5477
 // EXTERNAL MODULE: ./src/core/settings.js
5478
-var settings = __nested_webpack_require_312538__(3135);
5478
+var settings = __nested_webpack_require_312600__(3135);
5479 5479
 // EXTERNAL MODULE: ./src/core/speedy-promise.js
5480
-var speedy_promise = __nested_webpack_require_312538__(4500);
5480
+var speedy_promise = __nested_webpack_require_312600__(4500);
5481 5481
 ;// CONCATENATED MODULE: ./src/utils/asap.js
5482 5482
 /*
5483 5483
  * speedy-vision.js
@@ -5535,7 +5535,7 @@ function asap(fn, ...params)
5535 5535
     window.postMessage(ASAP_KEY, '*');
5536 5536
 }
5537 5537
 // EXTERNAL MODULE: ./src/utils/errors.js
5538
-var utils_errors = __nested_webpack_require_312538__(3841);
5538
+var utils_errors = __nested_webpack_require_312600__(3841);
5539 5539
 ;// CONCATENATED MODULE: ./src/gpu/speedy-texture-reader.js
5540 5540
 /*
5541 5541
  * speedy-vision.js
@@ -5912,7 +5912,7 @@ class SpeedyTextureReader
5912 5912
     }
5913 5913
 }
5914 5914
 // EXTERNAL MODULE: ./src/utils/globals.js
5915
-var globals = __nested_webpack_require_312538__(3020);
5915
+var globals = __nested_webpack_require_312600__(3020);
5916 5916
 ;// CONCATENATED MODULE: ./src/gpu/speedy-texture.js
5917 5917
 /*
5918 5918
  * speedy-vision.js
@@ -6643,7 +6643,7 @@ class SpeedyDrawableTexture extends SpeedyTexture
6643 6643
     }
6644 6644
 }
6645 6645
 // EXTERNAL MODULE: ./src/gpu/shader-declaration.js + 1 modules
6646
-var shader_declaration = __nested_webpack_require_312538__(9759);
6646
+var shader_declaration = __nested_webpack_require_312600__(9759);
6647 6647
 ;// CONCATENATED MODULE: ./src/gpu/speedy-program.js
6648 6648
 /*
6649 6649
  * speedy-vision.js
@@ -7660,7 +7660,7 @@ class SpeedyProgramGroupUtils extends SpeedyProgramGroup
7660 7660
     }
7661 7661
 }
7662 7662
 // EXTERNAL MODULE: ./src/gpu/shaders/filters/convolution.js
7663
-var convolution = __nested_webpack_require_312538__(6776);
7663
+var convolution = __nested_webpack_require_312600__(6776);
7664 7664
 ;// CONCATENATED MODULE: ./src/gpu/programs/filters.js
7665 7665
 /*
7666 7666
  * speedy-vision.js
@@ -7847,7 +7847,7 @@ class SpeedyProgramGroupFilters extends SpeedyProgramGroup
7847 7847
 }
7848 7848
 
7849 7849
 // EXTERNAL MODULE: ./src/core/speedy-namespace.js
7850
-var speedy_namespace = __nested_webpack_require_312538__(2411);
7850
+var speedy_namespace = __nested_webpack_require_312600__(2411);
7851 7851
 ;// CONCATENATED MODULE: ./src/gpu/speedy-descriptordb.js
7852 7852
 /*
7853 7853
  * speedy-vision.js
@@ -9486,7 +9486,7 @@ class SpeedyTexturePool
9486 9486
     }
9487 9487
 }
9488 9488
 // EXTERNAL MODULE: ./src/utils/types.js
9489
-var types = __nested_webpack_require_312538__(6731);
9489
+var types = __nested_webpack_require_312600__(6731);
9490 9490
 ;// CONCATENATED MODULE: ./src/core/speedy-media-source.js
9491 9491
 /*
9492 9492
  * speedy-vision.js
@@ -10278,7 +10278,7 @@ class SpeedyTextureUploader
10278 10278
     }
10279 10279
 }
10280 10280
 // EXTERNAL MODULE: ./src/utils/observable.js
10281
-var observable = __nested_webpack_require_312538__(9845);
10281
+var observable = __nested_webpack_require_312600__(9845);
10282 10282
 ;// CONCATENATED MODULE: ./src/gpu/speedy-gpu.js
10283 10283
 /*
10284 10284
  * speedy-vision.js
@@ -11223,11 +11223,11 @@ class SpeedyPoint2
11223 11223
     }
11224 11224
 }
11225 11225
 // EXTERNAL MODULE: ./src/core/speedy-matrix-expr.js
11226
-var speedy_matrix_expr = __nested_webpack_require_312538__(5137);
11226
+var speedy_matrix_expr = __nested_webpack_require_312600__(5137);
11227 11227
 // EXTERNAL MODULE: ./src/core/speedy-matrix-wasm.js
11228
-var speedy_matrix_wasm = __nested_webpack_require_312538__(4368);
11228
+var speedy_matrix_wasm = __nested_webpack_require_312600__(4368);
11229 11229
 // EXTERNAL MODULE: ./src/core/speedy-matrix.js
11230
-var speedy_matrix = __nested_webpack_require_312538__(8007);
11230
+var speedy_matrix = __nested_webpack_require_312600__(8007);
11231 11231
 ;// CONCATENATED MODULE: ./src/core/speedy-matrix-factory.js
11232 11232
 /*
11233 11233
  * speedy-vision.js

+ 3
- 3
dist/martins.min.js
文件差異過大導致無法顯示
查看文件


+ 2
- 2
package-lock.json 查看文件

@@ -3154,7 +3154,7 @@
3154 3154
     },
3155 3155
     "node_modules/speedy-vision": {
3156 3156
       "version": "0.9.1-wip",
3157
-      "resolved": "git+ssh://git@github.com/alemart/speedy-vision.git#5143cab2a827f08769e2f8b6f0867204f593cfbf",
3157
+      "resolved": "git+ssh://git@github.com/alemart/speedy-vision.git#48934ac8317a5b7c3a665af00c69d22e626b888a",
3158 3158
       "license": "Apache-2.0",
3159 3159
       "funding": {
3160 3160
         "url": "https://github.com/sponsors/alemart"
@@ -6142,7 +6142,7 @@
6142 6142
       }
6143 6143
     },
6144 6144
     "speedy-vision": {
6145
-      "version": "git+ssh://git@github.com/alemart/speedy-vision.git#5143cab2a827f08769e2f8b6f0867204f593cfbf",
6145
+      "version": "git+ssh://git@github.com/alemart/speedy-vision.git#48934ac8317a5b7c3a665af00c69d22e626b888a",
6146 6146
       "from": "speedy-vision@alemart/speedy-vision"
6147 6147
     },
6148 6148
     "statuses": {

Loading…
取消
儲存