@@ -1261,13 +1261,13 @@ define([
1261
1261
derivedCommands . front = deriveTranslucentCommand ( command , CullFace . BACK ) ;
1262
1262
}
1263
1263
1264
- var bivariateVisibilityTest = tileset . _hasMixedContent && this . context . stencilBuffer ;
1264
+ var bivariateVisibilityTest = tileset . skipLODs && tileset . _hasMixedContent && this . context . stencilBuffer ;
1265
1265
1266
1266
if ( bivariateVisibilityTest ) {
1267
- if ( ! tile . _finalResolution ) {
1268
- if ( ! defined ( derivedCommands . zback ) ) {
1269
- derivedCommands . zback = deriveZBackfaceCommand ( command ) ;
1270
- }
1267
+ if ( ! defined ( derivedCommands . zback ) ) {
1268
+ derivedCommands . zback = deriveZBackfaceCommand ( command ) ;
1269
+ }
1270
+ if ( command . pass !== Pass . TRANSLUCENT ) {
1271
1271
tileset . _backfaceCommands . push ( derivedCommands . zback ) ;
1272
1272
}
1273
1273
@@ -1340,13 +1340,16 @@ define([
1340
1340
1341
1341
function deriveCommand ( command ) {
1342
1342
var derivedCommand = DrawCommand . shallowClone ( command ) ;
1343
- derivedCommand . pass = Pass . CESIUM_3D_TILE ;
1344
1343
1345
1344
// Add a uniform to indicate if the original command was translucent so
1346
1345
// the shader knows not to cull vertices that were originally transparent
1347
1346
// even though their style is opaque.
1348
1347
var translucentCommand = ( derivedCommand . pass === Pass . TRANSLUCENT ) ;
1349
1348
1349
+ if ( ! translucentCommand ) {
1350
+ derivedCommand . pass = Pass . CESIUM_3D_TILE ;
1351
+ }
1352
+
1350
1353
derivedCommand . uniformMap = defined ( derivedCommand . uniformMap ) ? derivedCommand . uniformMap : { } ;
1351
1354
derivedCommand . uniformMap . tile_translucentCommand = function ( ) {
1352
1355
return translucentCommand ;
0 commit comments