@galacean/engine-loader 2.0.0-alpha.7 → 2.0.0-alpha.9
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.
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -1
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
package/dist/module.js
CHANGED
|
@@ -6238,7 +6238,8 @@ var Texture2DContentRestorer = /*#__PURE__*/ function(ContentRestorer) {
|
|
|
6238
6238
|
var scaleFactor = Math.pow(2, pixels[srcIndex + 3] - 128) / 255;
|
|
6239
6239
|
var dstIndex = y * texSize * 4 + x * 4;
|
|
6240
6240
|
for(var c = 0; c < 3; c++){
|
|
6241
|
-
|
|
6241
|
+
// Clamp to half-float max (65504) to prevent Infinity in R16G16B16A16
|
|
6242
|
+
floatView[0] = Math.min(pixels[srcIndex + c] * scaleFactor, 65504);
|
|
6242
6243
|
var f = uint32View[0];
|
|
6243
6244
|
var e = f >> 23 & 0x1ff;
|
|
6244
6245
|
facePixels[dstIndex + c] = baseTable[e] + ((f & 0x007fffff) >> shiftTable[e]);
|