@jdultra/threedtiles 14.0.5 → 14.0.6

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.
@@ -1166,6 +1166,7 @@ out vec2 vUv;
1166
1166
  out vec3 splatPositionWorld;
1167
1167
  out vec3 splatPositionModel;
1168
1168
  out float splatDepth;
1169
+ out float splatDepthWithBias;
1169
1170
  out float stds;
1170
1171
  out vec2 viewZW;
1171
1172
  uniform highp usampler3D positionColorTexture;
@@ -1344,9 +1345,11 @@ void main() {
1344
1345
 
1345
1346
  #if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
1346
1347
  float isPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
1347
- splatDepth = isPerspective == 0.0 ? splatPositionProjectedWithBias.z : log2( 1.0 + splatPositionProjectedWithBias.w ) * logDepthBufFC * 0.5;
1348
+ splatDepthWithBias = isPerspective == 0.0 ? splatPositionProjectedWithBias.z : log2( 1.0 + splatPositionProjectedWithBias.w ) * logDepthBufFC * 0.5;
1349
+ splatDepth = isPerspective == 0.0 ? splatPositionProjected.z : log2( 1.0 + splatPositionProjected.w ) * logDepthBufFC * 0.5;
1348
1350
  #else
1349
- splatDepth = (splatPositionProjectedWithBias.z / splatPositionProjectedWithBias.w)* 0.5 + 0.5;
1351
+ splatDepthWithBias = (splatPositionProjectedWithBias.z / splatPositionProjectedWithBias.w)* 0.5 + 0.5;
1352
+ splatDepth = (splatPositionProjected.z / splatPositionProjected.w)* 0.5 + 0.5;
1350
1353
  #endif
1351
1354
 
1352
1355
 
@@ -1361,6 +1364,7 @@ in vec2 vUv;
1361
1364
  in vec3 splatPositionModel;
1362
1365
  in vec3 splatPositionWorld;
1363
1366
  in float splatDepth;
1367
+ in float splatDepthWithBias;
1364
1368
 
1365
1369
  layout(location = 0) out vec4 fragColor;
1366
1370
 
@@ -1378,7 +1382,7 @@ void main() {
1378
1382
  float alpha = color.w * exp(-beta_k * rk);
1379
1383
 
1380
1384
  fragColor = vec4(pow(color.xyz,vec3(1.0/2.2)), alpha);
1381
- gl_FragDepth = splatDepth;
1385
+ gl_FragDepth = splatDepthWithBias;
1382
1386
 
1383
1387
  }`}function vC(){return`
1384
1388