Skip to content

Commit 1210634

Browse files
fix: #410 fully, with backward compatibility to old encoder
1 parent 2da53dc commit 1210634

File tree

7 files changed

+12
-8389
lines changed

7 files changed

+12
-8389
lines changed

bin/gpu-browser-core.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* GPU Accelerated JavaScript
66
*
77
* @version 2.0.0-rc.14
8-
* @date Mon May 27 2019 14:59:27 GMT-0400 (Eastern Daylight Time)
8+
* @date Mon May 27 2019 15:03:41 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -5047,7 +5047,6 @@ class Kernel {
50475047
module.exports = {
50485048
Kernel
50495049
};
5050-
50515050
},{"../input":84,"../utils":88}],34:[function(require,module,exports){
50525051
const fragmentShader = `__HEADER__;
50535052
precision highp float;
@@ -5261,6 +5260,7 @@ vec4 legacyEncode32(float f) {
52615260
float exponent = floor(log2(F));
52625261
float mantissa = (exp2(-exponent) * F);
52635262
// exponent += floor(log2(mantissa));
5263+
exponent = exponent + 127.0;
52645264
vec4 texel = vec4(F * exp2(23.0-exponent)) * SCALE_FACTOR_INV;
52655265
texel.rg = integerMod(texel.rg, 256.0);
52665266
texel.b = integerMod(texel.b, 128.0);
@@ -9009,7 +9009,6 @@ void main(void) {
90099009
module.exports = {
90109010
fragmentShader
90119011
};
9012-
90139012
},{}],58:[function(require,module,exports){
90149013
const { WebGLFunctionNode } = require('../web-gl/function-node');
90159014

bin/gpu-browser-core.min.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* GPU Accelerated JavaScript
66
*
77
* @version 2.0.0-rc.14
8-
* @date Mon May 27 2019 14:59:30 GMT-0400 (Eastern Daylight Time)
8+
* @date Mon May 27 2019 15:03:44 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -18,7 +18,7 @@
1818
* GPU Accelerated JavaScript
1919
*
2020
* @version 2.0.0-rc.14
21-
* @date Mon May 27 2019 14:59:27 GMT-0400 (Eastern Daylight Time)
21+
* @date Mon May 27 2019 15:03:41 GMT-0400 (Eastern Daylight Time)
2222
*
2323
* @license MIT
2424
* The MIT License
@@ -5060,7 +5060,6 @@ class Kernel {
50605060
module.exports = {
50615061
Kernel
50625062
};
5063-
50645063
},{"../input":84,"../utils":88}],34:[function(require,module,exports){
50655064
const fragmentShader = `__HEADER__;
50665065
precision highp float;
@@ -5274,6 +5273,7 @@ vec4 legacyEncode32(float f) {
52745273
float exponent = floor(log2(F));
52755274
float mantissa = (exp2(-exponent) * F);
52765275
// exponent += floor(log2(mantissa));
5276+
exponent = exponent + 127.0;
52775277
vec4 texel = vec4(F * exp2(23.0-exponent)) * SCALE_FACTOR_INV;
52785278
texel.rg = integerMod(texel.rg, 256.0);
52795279
texel.b = integerMod(texel.b, 128.0);
@@ -9022,7 +9022,6 @@ void main(void) {
90229022
module.exports = {
90239023
fragmentShader
90249024
};
9025-
90269025
},{}],58:[function(require,module,exports){
90279026
const { WebGLFunctionNode } = require('../web-gl/function-node');
90289027

bin/gpu-browser.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* GPU Accelerated JavaScript
66
*
77
* @version 2.0.0-rc.14
8-
* @date Mon May 27 2019 14:59:27 GMT-0400 (Eastern Daylight Time)
8+
* @date Mon May 27 2019 15:03:41 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -9811,7 +9811,6 @@ class Kernel {
98119811
module.exports = {
98129812
Kernel
98139813
};
9814-
98159814
},{"../input":85,"../utils":89}],35:[function(require,module,exports){
98169815
const fragmentShader = `__HEADER__;
98179816
precision highp float;
@@ -10025,6 +10024,7 @@ vec4 legacyEncode32(float f) {
1002510024
float exponent = floor(log2(F));
1002610025
float mantissa = (exp2(-exponent) * F);
1002710026
// exponent += floor(log2(mantissa));
10027+
exponent = exponent + 127.0;
1002810028
vec4 texel = vec4(F * exp2(23.0-exponent)) * SCALE_FACTOR_INV;
1002910029
texel.rg = integerMod(texel.rg, 256.0);
1003010030
texel.b = integerMod(texel.b, 128.0);
@@ -13773,7 +13773,6 @@ void main(void) {
1377313773
module.exports = {
1377413774
fragmentShader
1377513775
};
13776-
1377713776
},{}],59:[function(require,module,exports){
1377813777
const { WebGLFunctionNode } = require('../web-gl/function-node');
1377913778

bin/gpu-browser.min.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* GPU Accelerated JavaScript
66
*
77
* @version 2.0.0-rc.14
8-
* @date Mon May 27 2019 14:59:30 GMT-0400 (Eastern Daylight Time)
8+
* @date Mon May 27 2019 15:03:44 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -18,7 +18,7 @@
1818
* GPU Accelerated JavaScript
1919
*
2020
* @version 2.0.0-rc.14
21-
* @date Mon May 27 2019 14:59:27 GMT-0400 (Eastern Daylight Time)
21+
* @date Mon May 27 2019 15:03:41 GMT-0400 (Eastern Daylight Time)
2222
*
2323
* @license MIT
2424
* The MIT License
@@ -9824,7 +9824,6 @@ class Kernel {
98249824
module.exports = {
98259825
Kernel
98269826
};
9827-
98289827
},{"../input":85,"../utils":89}],35:[function(require,module,exports){
98299828
const fragmentShader = `__HEADER__;
98309829
precision highp float;
@@ -10038,6 +10037,7 @@ vec4 legacyEncode32(float f) {
1003810037
float exponent = floor(log2(F));
1003910038
float mantissa = (exp2(-exponent) * F);
1004010039
// exponent += floor(log2(mantissa));
10040+
exponent = exponent + 127.0;
1004110041
vec4 texel = vec4(F * exp2(23.0-exponent)) * SCALE_FACTOR_INV;
1004210042
texel.rg = integerMod(texel.rg, 256.0);
1004310043
texel.b = integerMod(texel.b, 128.0);
@@ -13786,7 +13786,6 @@ void main(void) {
1378613786
module.exports = {
1378713787
fragmentShader
1378813788
};
13789-
1379013789
},{}],59:[function(require,module,exports){
1379113790
const { WebGLFunctionNode } = require('../web-gl/function-node');
1379213791

0 commit comments

Comments
 (0)