UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

17 lines (16 loc) 603 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _Normal = require("../../accessors/Normal.js"); var _TSLBase = require("../../tsl/TSLBase.js"); const getGeometryRoughness = /*@__PURE__*/(0, _TSLBase.Fn)(builder => { if (builder.geometry.hasAttribute('normal') === false) { return (0, _TSLBase.float)(0); } const dxy = _Normal.normalView.dFdx().abs().max(_Normal.normalView.dFdy().abs()); const geometryRoughness = dxy.x.max(dxy.y).max(dxy.z); return geometryRoughness; }); var _default = exports.default = getGeometryRoughness;