* @typedef {object} PickedMetadataInfo * * Information about metadata that is supposed to be picked * * @property {string|undefined} schemaId The optional ID of the metadata schema * @property {string} className The name of the metadata class * @property {string} propertyName The name of the m
(scene, drawingBufferPosition)
| 632 | */ |
| 633 | |
| 634 | function renderTranslucentDepthForPick(scene, drawingBufferPosition) { |
| 635 | // PERFORMANCE_IDEA: render translucent only and merge with the previous frame |
| 636 | const { defaultView, context, frameState, environmentState } = scene; |
| 637 | const { viewport, pickDepthFramebuffer } = defaultView; |
| 638 | |
| 639 | scene.view = defaultView; |
| 640 | |
| 641 | viewport.x = 0; |
| 642 | viewport.y = 0; |
| 643 | viewport.width = context.drawingBufferWidth; |
| 644 | viewport.height = context.drawingBufferHeight; |
| 645 | |
| 646 | let passState = defaultView.passState; |
| 647 | passState.viewport = BoundingRectangle.clone(viewport, passState.viewport); |
| 648 | |
| 649 | scene.clearPasses(frameState.passes); |
| 650 | frameState.passes.pick = true; |
| 651 | frameState.passes.depth = true; |
| 652 | frameState.cullingVolume = getPickCullingVolume( |
| 653 | scene, |
| 654 | drawingBufferPosition, |
| 655 | 1, |
| 656 | 1, |
| 657 | viewport, |
| 658 | ); |
| 659 | frameState.tilesetPassState = pickTilesetPassState; |
| 660 | |
| 661 | scene.updateEnvironment(); |
| 662 | environmentState.renderTranslucentDepthForPick = true; |
| 663 | passState = pickDepthFramebuffer.update( |
| 664 | context, |
| 665 | drawingBufferPosition, |
| 666 | viewport, |
| 667 | ); |
| 668 | |
| 669 | scene.updateAndExecuteCommands(passState, scratchColorZero); |
| 670 | scene.resolveFramebuffers(passState); |
| 671 | |
| 672 | context.endFrame(); |
| 673 | } |
| 674 | |
| 675 | const scratchPerspectiveFrustum = new PerspectiveFrustum(); |
| 676 | const scratchPerspectiveOffCenterFrustum = new PerspectiveOffCenterFrustum(); |
no test coverage detected
searching dependent graphs…