@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.
@@ -9285,6 +9285,7 @@ out vec2 vUv;
9285
9285
  out vec3 splatPositionWorld;
9286
9286
  out vec3 splatPositionModel;
9287
9287
  out float splatDepth;
9288
+ out float splatDepthWithBias;
9288
9289
  out float stds;
9289
9290
  out vec2 viewZW;
9290
9291
  uniform highp usampler3D positionColorTexture;
@@ -9463,9 +9464,11 @@ void main() {
9463
9464
 
9464
9465
  #if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
9465
9466
  float isPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
9466
- splatDepth = isPerspective == 0.0 ? splatPositionProjectedWithBias.z : log2( 1.0 + splatPositionProjectedWithBias.w ) * logDepthBufFC * 0.5;
9467
+ splatDepthWithBias = isPerspective == 0.0 ? splatPositionProjectedWithBias.z : log2( 1.0 + splatPositionProjectedWithBias.w ) * logDepthBufFC * 0.5;
9468
+ splatDepth = isPerspective == 0.0 ? splatPositionProjected.z : log2( 1.0 + splatPositionProjected.w ) * logDepthBufFC * 0.5;
9467
9469
  #else
9468
- splatDepth = (splatPositionProjectedWithBias.z / splatPositionProjectedWithBias.w)* 0.5 + 0.5;
9470
+ splatDepthWithBias = (splatPositionProjectedWithBias.z / splatPositionProjectedWithBias.w)* 0.5 + 0.5;
9471
+ splatDepth = (splatPositionProjected.z / splatPositionProjected.w)* 0.5 + 0.5;
9469
9472
  #endif
9470
9473
 
9471
9474
 
@@ -9483,6 +9486,7 @@ in vec2 vUv;
9483
9486
  in vec3 splatPositionModel;
9484
9487
  in vec3 splatPositionWorld;
9485
9488
  in float splatDepth;
9489
+ in float splatDepthWithBias;
9486
9490
 
9487
9491
  layout(location = 0) out vec4 fragColor;
9488
9492
 
@@ -9500,7 +9504,7 @@ void main() {
9500
9504
  float alpha = color.w * exp(-beta_k * rk);
9501
9505
 
9502
9506
  fragColor = vec4(pow(color.xyz,vec3(1.0/2.2)), alpha);
9503
- gl_FragDepth = splatDepth;
9507
+ gl_FragDepth = splatDepthWithBias;
9504
9508
 
9505
9509
  }`;
9506
9510
  }