@jdultra/threedtiles 13.3.2 → 13.3.3
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/threedtiles.cjs.js +13 -11
- package/dist/threedtiles.cjs.js.map +1 -1
- package/dist/threedtiles.es.js +13 -11
- package/dist/threedtiles.es.js.map +1 -1
- package/dist/threedtiles.umd.js +13 -11
- package/dist/threedtiles.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/threedtiles.es.js
CHANGED
|
@@ -7340,19 +7340,21 @@ void getVertexData(out vec3 position, out mat3 covariance) {
|
|
|
7340
7340
|
int( (y + 0.5) ), // y pixel
|
|
7341
7341
|
int( sliceIndex + 0.5 ) ); // z slice */
|
|
7342
7342
|
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
float sliceIndex = floor(index / pixelsPerSlice);
|
|
7346
|
-
float slicePixelIndex = mod(index,pixelsPerSlice);
|
|
7343
|
+
|
|
7344
|
+
highp uint uOrder = order; // Use a local uint copy
|
|
7347
7345
|
|
|
7348
|
-
|
|
7349
|
-
|
|
7346
|
+
// It's good practice to ensure textureSize is treated as uint for these calcs
|
|
7347
|
+
uint uTextureSize = uint(textureSize); // textureSize uniform is float
|
|
7348
|
+
uint uPixelsPerSlice = uTextureSize * uTextureSize;
|
|
7350
7349
|
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7350
|
+
uint sliceIndexVal = uOrder / uPixelsPerSlice;
|
|
7351
|
+
uint slicePixelIndex = uOrder % uPixelsPerSlice; // umod(uOrder, uPixelsPerSlice) also works
|
|
7352
|
+
|
|
7353
|
+
uint xVal = slicePixelIndex % uTextureSize; // umod(slicePixelIndex, uTextureSize)
|
|
7354
|
+
uint yVal = slicePixelIndex / uTextureSize;
|
|
7355
|
+
|
|
7356
|
+
// texelFetch takes ivec3 for coordinates, no +0.5 needed as these are direct integer indices
|
|
7357
|
+
ivec3 coord = ivec3(xVal, yVal, sliceIndexVal);
|
|
7356
7358
|
|
|
7357
7359
|
// Position
|
|
7358
7360
|
highp uvec4 positionColor = texelFetch(positionColorTexture, coord,0);
|