UNPKG

@xeokit/xeokit-sdk

Version:

3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision

13 lines (12 loc) 654 B
export const PickMeshProgram = function(programVariables, geometry, logarithmicDepthBufferEnabled) { const vPickColor = programVariables.createVarying("vec4", "vPickColor", () => `${geometry.attributes.pickColor} / 255.0`); const outPickColor = programVariables.createOutput("vec4", "outPickColor"); return { programName: "PickMesh", getLogDepth: logarithmicDepthBufferEnabled && (vFragDepth => vFragDepth), renderPassFlag: 3, // PICK incPointSizeBy10: true, dontCullOnAlphaZero: true, // should be false? appendFragmentOutputs: (src) => src.push(`${outPickColor} = ${vPickColor};`) }; };