Skip to main content
Glama

MCP 3D Printer Server

LightUtils.js1.12 kB
import { Fn } from '../tsl/TSLBase.js'; /** @module LightUtils **/ /** * Represents a `discard` shader operation in TSL. * * @method * @param {Object} inputs - The input parameter object. * @param {Node<float>} inputs.lightDistance - The distance of the light's position to the current fragment position. * @param {Node<float>} inputs.cutoffDistance - The light's cutoff distance. * @param {Node<float>} inputs.decayExponent - The light's decay exponent. * @return {Node<float>} The distance falloff. */ export const getDistanceAttenuation = /*@__PURE__*/ Fn( ( inputs ) => { const { lightDistance, cutoffDistance, decayExponent } = inputs; // based upon Frostbite 3 Moving to Physically-based Rendering // page 32, equation 26: E[window1] // https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf const distanceFalloff = lightDistance.pow( decayExponent ).max( 0.01 ).reciprocal(); return cutoffDistance.greaterThan( 0 ).select( distanceFalloff.mul( lightDistance.div( cutoffDistance ).pow4().oneMinus().clamp().pow2() ), distanceFalloff ); } ); // validated

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DMontgomery40/mcp-3D-printer-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server