MCPcopy
hub / github.com/CesiumGS/cesium / renderTranslucentDepthForPick

Function renderTranslucentDepthForPick

packages/engine/Source/Scene/Picking.js:634–673  ·  view source on GitHub ↗

* @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)

Source from the content-addressed store, hash-verified

632 */
633
634function 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
675const scratchPerspectiveFrustum = new PerspectiveFrustum();
676const scratchPerspectiveOffCenterFrustum = new PerspectiveOffCenterFrustum();

Callers 1

Picking.jsFile · 0.85

Calls 3

getPickCullingVolumeFunction · 0.85
cloneMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…