molstar
Version:
A comprehensive macromolecular library.
17 lines (16 loc) • 551 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.check_picking_alpha = void 0;
exports.check_picking_alpha = `
float viewZ = depthToViewZ(uIsOrtho, fragmentDepth, uNear, uFar);
float fogFactor = smoothstep(uFogNear, uFogFar, abs(viewZ));
float alpha = (1.0 - fogFactor) * uAlpha;
// if not opaque enough ignore so the element below can be picked
if (uAlpha < uPickingAlphaThreshold || alpha < 0.1) {
#ifdef dTransparentBackfaces_opaque
if (!interior) discard;
#else
discard;
#endif
}
`;
;