From 3db361df5f35ac540f3758e9d324880ba1dd42e5 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Thu, 20 Jun 2024 23:30:27 -0400 Subject: [PATCH] TSL: Update MaterialX library --- .../jsm/nodes/materialx/lib/mx_hsv.d.ts | 1 + .../jsm/nodes/materialx/lib/mx_noise.d.ts | 230 ++++++++++++++++++ 2 files changed, 231 insertions(+) diff --git a/types/three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts b/types/three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts index 8e2395a84..a826bdea2 100644 --- a/types/three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +++ b/types/three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts @@ -2,4 +2,5 @@ import Node from "../../core/Node.js"; import { NodeRepresentation, ShaderNodeObject } from "../../shadernode/ShaderNode.js"; export const mx_hsvtorgb: (hsv_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_rgbtohsv: (c_immutable: NodeRepresentation) => ShaderNodeObject; diff --git a/types/three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts b/types/three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts index c2df3389a..982615616 100644 --- a/types/three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +++ b/types/three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts @@ -7,12 +7,34 @@ export const mx_select: ( t_immutable: NodeRepresentation, f_immutable: NodeRepresentation, ) => ShaderNodeObject; + export const mx_negate_if: ( val_immutable: NodeRepresentation, b_immutable: NodeRepresentation, ) => ShaderNodeObject; + export const mx_floor: (x_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_floorfrac: (x_immutable: NodeRepresentation, i: ShaderNodeObject) => ShaderNodeObject; + +export const mx_bilerp_0: ( + v0_immutable: NodeRepresentation, + v1_immutable: NodeRepresentation, + v2_immutable: NodeRepresentation, + v3_immutable: NodeRepresentation, + s_immutable: NodeRepresentation, + t_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_bilerp_1: ( + v0_immutable: NodeRepresentation, + v1_immutable: NodeRepresentation, + v2_immutable: NodeRepresentation, + v3_immutable: NodeRepresentation, + s_immutable: NodeRepresentation, + t_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_bilerp: ( v0_immutable: NodeRepresentation, v1_immutable: NodeRepresentation, @@ -21,6 +43,35 @@ export const mx_bilerp: ( s_immutable: NodeRepresentation, t_immutable: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_trilerp_0: ( + v0_immutable: NodeRepresentation, + v1_immutable: NodeRepresentation, + v2_immutable: NodeRepresentation, + v3_immutable: NodeRepresentation, + v4_immutable: NodeRepresentation, + v5_immutable: NodeRepresentation, + v6_immutable: NodeRepresentation, + v7_immutable: NodeRepresentation, + s_immutable: NodeRepresentation, + t_immutable: NodeRepresentation, + r_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_trilerp_1: ( + v0_immutable: NodeRepresentation, + v1_immutable: NodeRepresentation, + v2_immutable: NodeRepresentation, + v3_immutable: NodeRepresentation, + v4_immutable: NodeRepresentation, + v5_immutable: NodeRepresentation, + v6_immutable: NodeRepresentation, + v7_immutable: NodeRepresentation, + s_immutable: NodeRepresentation, + t_immutable: NodeRepresentation, + r_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_trilerp: ( v0_immutable: NodeRepresentation, v1_immutable: NodeRepresentation, @@ -34,33 +85,105 @@ export const mx_trilerp: ( t_immutable: NodeRepresentation, r_immutable: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_gradient_float_0: ( + hash_immutable: NodeRepresentation, + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_gradient_float_1: ( + hash_immutable: NodeRepresentation, + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_gradient_float: ( hash_immutable: NodeRepresentation, x_immutable: NodeRepresentation, y_immutable: NodeRepresentation, z_immutable?: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_gradient_vec3_0: ( + hash_immutable: NodeRepresentation, + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_gradient_vec3_1: ( + hash_immutable: NodeRepresentation, + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_gradient_vec3: ( hash_immutable: NodeRepresentation, x_immutable: NodeRepresentation, y_immutable: NodeRepresentation, z_immutable?: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_gradient_scale2d_0: (v_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_gradient_scale3d_0: (v_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_gradient_scale2d_1: (v_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_gradient_scale2d: (v_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_gradient_scale3d_1: (v_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_gradient_scale3d: (v_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_rotl32: (x_immutable: NodeRepresentation, k_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_bjmix: ( a: ShaderNodeObject, b: ShaderNodeObject, c: ShaderNodeObject, ) => ShaderNodeObject; + export const mx_bjfinal: ( a_immutable: NodeRepresentation, b_immutable: NodeRepresentation, c_immutable: NodeRepresentation, ) => ShaderNodeObject; + export const mx_bits_to_01: (bits_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_fade: (t_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_hash_int_0: (x_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_hash_int_1: ( + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_hash_int_2: ( + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_hash_int_3: ( + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, + xx_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_hash_int_4: ( + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, + xx_immutable: NodeRepresentation, + yy_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_hash_int: ( x_immutable: NodeRepresentation, y_immutable?: NodeRepresentation, @@ -68,39 +191,107 @@ export const mx_hash_int: ( xx_immutable?: NodeRepresentation, yy_immutable?: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_hash_vec3_0: ( + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_hash_vec3_1: ( + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_hash_vec3: ( x_immutable: NodeRepresentation, y_immutable: NodeRepresentation, z_immutable?: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_perlin_noise_float_0: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_perlin_noise_float_1: (p_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_perlin_noise_float: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_perlin_noise_vec3_0: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_perlin_noise_vec3_1: (p_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_perlin_noise_vec3: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_float_0: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_float_1: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_float_2: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_float_3: (p_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_cell_noise_float: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_vec3_0: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_vec3_1: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_vec3_2: (p_immutable: NodeRepresentation) => ShaderNodeObject; + +export const mx_cell_noise_vec3_3: (p_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_cell_noise_vec3: (p_immutable: NodeRepresentation) => ShaderNodeObject; + export const mx_fractal_noise_float: ( p_immutable: NodeRepresentation, octaves_immutable: NodeRepresentation, lacunarity_immutable: NodeRepresentation, diminish_immutable: NodeRepresentation, ) => ShaderNodeObject; + export const mx_fractal_noise_vec3: ( p_immutable: NodeRepresentation, octaves_immutable: NodeRepresentation, lacunarity_immutable: NodeRepresentation, diminish_immutable: NodeRepresentation, ) => ShaderNodeObject; + export const mx_fractal_noise_vec2: ( p_immutable: NodeRepresentation, octaves_immutable: NodeRepresentation, lacunarity_immutable: NodeRepresentation, diminish_immutable: NodeRepresentation, ) => ShaderNodeObject; + export const mx_fractal_noise_vec4: ( p_immutable: NodeRepresentation, octaves_immutable: NodeRepresentation, lacunarity_immutable: NodeRepresentation, diminish_immutable: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_worley_distance_0: ( + p_immutable: NodeRepresentation, + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, + xoff_immutable: NodeRepresentation, + yoff_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, + metric_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_worley_distance_1: ( + p_immutable: NodeRepresentation, + x_immutable: NodeRepresentation, + y_immutable: NodeRepresentation, + z_immutable: NodeRepresentation, + xoff_immutable: NodeRepresentation, + yoff_immutable: NodeRepresentation, + zoff_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, + metric_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_worley_distance: ( p_immutable: NodeRepresentation, x_immutable: NodeRepresentation, @@ -110,18 +301,57 @@ export const mx_worley_distance: ( yoff_immutable: NodeRepresentation, zoff_immutable: NodeRepresentation, jitter_immutable: NodeRepresentation, + metric_immutable?: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_worley_noise_float_0: ( + p_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, + metric_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_worley_noise_vec2_0: ( + p_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, metric_immutable: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_worley_noise_vec3_0: ( + p_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, + metric_immutable: NodeRepresentation, +) => ShaderNodeObject; + +export const mx_worley_noise_float_1: ( + p_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, + metric_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_worley_noise_float: ( p_immutable: NodeRepresentation, jitter_immutable: NodeRepresentation, metric_immutable: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_worley_noise_vec2_1: ( + p_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, + metric_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_worley_noise_vec2: ( p_immutable: NodeRepresentation, jitter_immutable: NodeRepresentation, metric_immutable: NodeRepresentation, ) => ShaderNodeObject; + +export const mx_worley_noise_vec3_1: ( + p_immutable: NodeRepresentation, + jitter_immutable: NodeRepresentation, + metric_immutable: NodeRepresentation, +) => ShaderNodeObject; + export const mx_worley_noise_vec3: ( p_immutable: NodeRepresentation, jitter_immutable: NodeRepresentation,