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

12 lines (11 loc) 491 B
export const PickTriangleShaderSource = function(meshHash, programVariables, geometry) { const vColor = programVariables.createVarying("vec4", "vColor", () => geometry.attributes.pickColor); const outColor = programVariables.createOutput("vec4", "outColor"); return { getHash: () => [ meshHash ], programName: "PickTriangle", isPick: true, trianglePick: true, appendFragmentOutputs: (src) => src.push(`${outColor} = ${vColor};`) }; };