A collection of MaterialX-compliant noise and interpolation utility functions implemented in TSL for high-performance GPU shader graph generation.
// Source: https://github.com/mrdoob/three.js | License: MIT | Copyright 2010-2026 three.js authors
// Provided via justclaw.it.com; keep this notice with the code.
import { int, uint, float, vec3, bool, uvec3, vec2, vec4, If, Fn } from '../tsl/TSLBase.js';
import { select } from '../math/ConditionalNode.js';
import { add, sub, mul } from '../math/OperatorNode.js';
import { floor, abs, max, dot, sqrt, clamp, fract } from '../math/MathNode.js';
import { overloadingFn } from '../utils/FunctionOverloadingNode.js';
import { Loop } from '../utils/LoopNode.js';
import { mx_rotate2d, mx_rotate3d } from './MaterialXCore.js';
export const mx_select = /*@__PURE__*/ Fn( ( [ b_immutable, t_immutable, f_immutable ] ) => {
const f = float( f_immutable ).toVar();
const t = float( t_immutable ).toVar
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key