@plastic-software/three 0.167.1 → 0.167.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/build/three.cjs +6 -16
  2. package/build/three.module.js +6 -16
  3. package/build/three.module.min.js +1 -1
  4. package/build/three.webgpu.js +510 -354
  5. package/build/three.webgpu.min.js +1 -1
  6. package/examples/jsm/controls/Controls.js +32 -0
  7. package/examples/jsm/controls/DragControls.js +260 -132
  8. package/examples/jsm/transpiler/TSLEncoder.js +8 -8
  9. package/package.json +1 -1
  10. package/src/loaders/ObjectLoader.js +3 -3
  11. package/src/nodes/Nodes.js +3 -2
  12. package/src/nodes/accessors/BatchNode.js +2 -2
  13. package/src/nodes/accessors/ClippingNode.js +8 -8
  14. package/src/nodes/accessors/MorphNode.js +4 -4
  15. package/src/nodes/accessors/TangentNode.js +2 -2
  16. package/src/nodes/accessors/Texture3DNode.js +8 -8
  17. package/src/nodes/accessors/UniformArrayNode.js +5 -3
  18. package/src/nodes/core/StackNode.js +22 -6
  19. package/src/nodes/display/AfterImageNode.js +3 -3
  20. package/src/nodes/display/AnamorphicNode.js +4 -4
  21. package/src/nodes/display/BleachBypassNode.js +2 -2
  22. package/src/nodes/display/BlendModeNode.js +8 -8
  23. package/src/nodes/display/BloomNode.js +9 -9
  24. package/src/nodes/display/BumpMapNode.js +3 -3
  25. package/src/nodes/display/ColorAdjustmentNode.js +4 -4
  26. package/src/nodes/display/ColorSpaceNode.js +3 -3
  27. package/src/nodes/display/DenoiseNode.js +8 -8
  28. package/src/nodes/display/DepthOfFieldNode.js +2 -2
  29. package/src/nodes/display/DotScreenNode.js +3 -3
  30. package/src/nodes/display/FXAANode.js +11 -11
  31. package/src/nodes/display/FilmNode.js +2 -2
  32. package/src/nodes/display/GTAONode.js +9 -9
  33. package/src/nodes/display/GaussianBlurNode.js +2 -2
  34. package/src/nodes/display/Lut3DNode.js +2 -2
  35. package/src/nodes/display/NormalMapNode.js +2 -2
  36. package/src/nodes/display/PassNode.js +71 -3
  37. package/src/nodes/display/PixelationPassNode.js +3 -3
  38. package/src/nodes/display/RGBShiftNode.js +2 -2
  39. package/src/nodes/display/SepiaNode.js +2 -2
  40. package/src/nodes/display/SobelOperatorNode.js +2 -2
  41. package/src/nodes/display/ToneMappingNode.js +13 -13
  42. package/src/nodes/display/TransitionNode.js +3 -3
  43. package/src/nodes/functions/BSDF/BRDF_GGX.js +2 -2
  44. package/src/nodes/functions/BSDF/BRDF_Lambert.js +2 -2
  45. package/src/nodes/functions/BSDF/BRDF_Sheen.js +4 -4
  46. package/src/nodes/functions/BSDF/DFGApprox.js +2 -2
  47. package/src/nodes/functions/BSDF/D_GGX.js +2 -2
  48. package/src/nodes/functions/BSDF/D_GGX_Anisotropic.js +2 -2
  49. package/src/nodes/functions/BSDF/EnvironmentBRDF.js +2 -2
  50. package/src/nodes/functions/BSDF/F_Schlick.js +2 -2
  51. package/src/nodes/functions/BSDF/LTC.js +6 -6
  52. package/src/nodes/functions/BSDF/Schlick_to_F0.js +2 -2
  53. package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.js +2 -2
  54. package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.js +2 -2
  55. package/src/nodes/functions/PhongLightingModel.js +3 -3
  56. package/src/nodes/functions/PhysicalLightingModel.js +18 -18
  57. package/src/nodes/functions/ToonLightingModel.js +2 -2
  58. package/src/nodes/functions/material/getGeometryRoughness.js +2 -2
  59. package/src/nodes/functions/material/getRoughness.js +2 -2
  60. package/src/nodes/lighting/AnalyticLightNode.js +5 -5
  61. package/src/nodes/lighting/BasicEnvironmentNode.js +2 -1
  62. package/src/nodes/lighting/LightProbeNode.js +80 -0
  63. package/src/nodes/lighting/LightUtils.js +3 -3
  64. package/src/nodes/materials/InstancedPointsNodeMaterial.js +3 -3
  65. package/src/nodes/materials/Line2NodeMaterial.js +17 -17
  66. package/src/nodes/materials/MeshPhysicalNodeMaterial.js +1 -1
  67. package/src/nodes/materials/VolumeNodeMaterial.js +5 -5
  68. package/src/nodes/materialx/lib/mx_hsv.js +12 -12
  69. package/src/nodes/materialx/lib/mx_noise.js +80 -80
  70. package/src/nodes/materialx/lib/mx_transform_color.js +2 -2
  71. package/src/nodes/math/CondNode.js +13 -2
  72. package/src/nodes/math/MathNode.js +2 -2
  73. package/src/nodes/math/TriNoise3D.js +6 -6
  74. package/src/nodes/pmrem/PMREMUtils.js +34 -34
  75. package/src/nodes/procedural/CheckerNode.js +2 -2
  76. package/src/nodes/shadernode/ShaderNode.js +11 -4
  77. package/src/nodes/utils/CubeMapNode.js +157 -0
  78. package/src/nodes/utils/LoopNode.js +10 -4
  79. package/src/nodes/utils/SpriteUtils.js +2 -2
  80. package/src/nodes/utils/UVUtils.js +3 -3
  81. package/src/nodes/utils/ViewportUtils.js +3 -3
  82. package/src/renderers/WebGLRenderer.js +8 -0
  83. package/src/renderers/common/RenderContext.js +24 -0
  84. package/src/renderers/common/RenderObject.js +1 -1
  85. package/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.js +1 -1
  86. package/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.js +1 -1
  87. package/src/renderers/shaders/ShaderLib/linedashed.glsl.js +0 -2
  88. package/src/renderers/shaders/ShaderLib/points.glsl.js +0 -2
  89. package/src/renderers/webgl/WebGLPrograms.js +2 -1
  90. package/src/renderers/webgl-fallback/WebGLBackend.js +31 -27
  91. package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +12 -8
  92. package/src/renderers/webgpu/WebGPUBackend.js +10 -14
  93. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +30 -2
  94. package/src/renderers/webgpu/utils/WebGPUConstants.js +2 -1
@@ -36822,7 +36822,7 @@ class RenderObject {
36822
36822
 
36823
36823
  if ( object.count > 1 ) {
36824
36824
 
36825
- cacheKey += object.count + ',';
36825
+ cacheKey += object.count + ',' + object.uuid + ',';
36826
36826
 
36827
36827
  }
36828
36828
 
@@ -38059,7 +38059,7 @@ const defaultBuildStages = [ 'setup', 'analyze', 'generate' ];
38059
38059
  const shaderStages = [ ...defaultShaderStages, 'compute' ];
38060
38060
  const vectorComponents = [ 'x', 'y', 'z', 'w' ];
38061
38061
 
38062
- function getCacheKey( object, force = false ) {
38062
+ function getCacheKey$1( object, force = false ) {
38063
38063
 
38064
38064
  let cacheKey = '{';
38065
38065
 
@@ -38272,7 +38272,7 @@ var NodeUtils = /*#__PURE__*/Object.freeze({
38272
38272
  __proto__: null,
38273
38273
  arrayBufferToBase64: arrayBufferToBase64,
38274
38274
  base64ToArrayBuffer: base64ToArrayBuffer,
38275
- getCacheKey: getCacheKey,
38275
+ getCacheKey: getCacheKey$1,
38276
38276
  getNodeChildren: getNodeChildren,
38277
38277
  getValueFromType: getValueFromType,
38278
38278
  getValueType: getValueType
@@ -38414,7 +38414,7 @@ class Node extends EventDispatcher {
38414
38414
 
38415
38415
  if ( force === true || this._cacheKey === null ) {
38416
38416
 
38417
- this._cacheKey = getCacheKey( this, force );
38417
+ this._cacheKey = getCacheKey$1( this, force );
38418
38418
  this._cacheKeyVersion = this.version;
38419
38419
 
38420
38420
  }
@@ -39477,7 +39477,7 @@ const ShaderNodeObject = function ( obj, altType = null ) {
39477
39477
 
39478
39478
  } else if ( type === 'shader' ) {
39479
39479
 
39480
- return tslFn( obj );
39480
+ return Fn( obj );
39481
39481
 
39482
39482
  }
39483
39483
 
@@ -39613,7 +39613,7 @@ class ShaderCallNodeInternal extends Node {
39613
39613
  }
39614
39614
 
39615
39615
  const jsFunc = shaderNode.jsFunc;
39616
- const outputNode = inputNodes !== null ? jsFunc( inputNodes, builder.stack, builder ) : jsFunc( builder.stack, builder );
39616
+ const outputNode = inputNodes !== null ? jsFunc( inputNodes, builder ) : jsFunc( builder );
39617
39617
 
39618
39618
  return nodeObject( outputNode );
39619
39619
 
@@ -39805,7 +39805,7 @@ const nodeArray = ( val, altType = null ) => new ShaderNodeArray( val, altType )
39805
39805
  const nodeProxy = ( ...params ) => new ShaderNodeProxy( ...params );
39806
39806
  const nodeImmutable = ( ...params ) => new ShaderNodeImmutable( ...params );
39807
39807
 
39808
- const tslFn = ( jsFunc ) => {
39808
+ const Fn = ( jsFunc ) => {
39809
39809
 
39810
39810
  const shaderNode = new ShaderNode( jsFunc );
39811
39811
 
@@ -39842,6 +39842,13 @@ const tslFn = ( jsFunc ) => {
39842
39842
 
39843
39843
  };
39844
39844
 
39845
+ const tslFn = ( ...params ) => { // @deprecated, r168
39846
+
39847
+ console.warn( 'TSL.tslFn: tslFn() has been renamed to Fn().' );
39848
+ return Fn( ...params );
39849
+
39850
+ };
39851
+
39845
39852
  addNodeClass( 'ShaderNode', ShaderNode );
39846
39853
 
39847
39854
  //
@@ -39864,7 +39871,7 @@ const setCurrentStack = ( stack ) => {
39864
39871
 
39865
39872
  const getCurrentStack = () => currentStack;
39866
39873
 
39867
- const If = ( ...params ) => currentStack.if( ...params );
39874
+ const If = ( ...params ) => currentStack.If( ...params );
39868
39875
 
39869
39876
  function append( node ) {
39870
39877
 
@@ -41922,7 +41929,7 @@ const refract = nodeProxy( MathNode, MathNode.REFRACT );
41922
41929
  const smoothstep = nodeProxy( MathNode, MathNode.SMOOTHSTEP );
41923
41930
  const faceForward = nodeProxy( MathNode, MathNode.FACEFORWARD );
41924
41931
 
41925
- const rand = tslFn( ( [ uv ] ) => {
41932
+ const rand = Fn( ( [ uv ] ) => {
41926
41933
 
41927
41934
  const a = 12.9898, b = 78.233, c = 43758.5453;
41928
41935
  const dt = dot( uv.xy, vec2( a, b ) ), sn = mod( dt, PI );
@@ -41995,7 +42002,7 @@ addNodeElement( 'rand', rand );
41995
42002
 
41996
42003
  addNodeClass( 'MathNode', MathNode );
41997
42004
 
41998
- const sRGBToLinearShader = tslFn( ( inputs ) => {
42005
+ const sRGBToLinearShader = Fn( ( inputs ) => {
41999
42006
 
42000
42007
  const { value } = inputs;
42001
42008
  const { rgb } = value;
@@ -42010,7 +42017,7 @@ const sRGBToLinearShader = tslFn( ( inputs ) => {
42010
42017
 
42011
42018
  } );
42012
42019
 
42013
- const LinearTosRGBShader = tslFn( ( inputs ) => {
42020
+ const LinearTosRGBShader = Fn( ( inputs ) => {
42014
42021
 
42015
42022
  const { value } = inputs;
42016
42023
  const { rgb } = value;
@@ -43983,7 +43990,7 @@ const instance = nodeProxy( InstanceNode );
43983
43990
 
43984
43991
  addNodeClass( 'InstanceNode', InstanceNode );
43985
43992
 
43986
- const tangentGeometry = /*#__PURE__*/ tslFn( ( stack, builder ) => {
43993
+ const tangentGeometry = /*#__PURE__*/ Fn( ( builder ) => {
43987
43994
 
43988
43995
  if ( builder.geometry.hasAttribute( 'tangent' ) === false ) {
43989
43996
 
@@ -44034,7 +44041,7 @@ class BatchNode extends Node {
44034
44041
 
44035
44042
  }
44036
44043
 
44037
- const getIndirectIndex = tslFn( ( [ id ] ) => {
44044
+ const getIndirectIndex = Fn( ( [ id ] ) => {
44038
44045
 
44039
44046
  const size = textureSize( textureLoad( this.batchMesh._indirectTexture ), 0 );
44040
44047
  const x = int( id ).remainder( int( size ) );
@@ -44385,18 +44392,16 @@ class LoopNode extends Node {
44385
44392
 
44386
44393
  }
44387
44394
 
44388
- const loop = ( ...params ) => nodeObject( new LoopNode( nodeArray( params, 'int' ) ) ).append();
44395
+ const Loop = ( ...params ) => nodeObject( new LoopNode( nodeArray( params, 'int' ) ) ).append();
44389
44396
  const Continue = () => expression( 'continue' ).append();
44390
44397
  const Break = () => expression( 'break' ).append();
44391
44398
 
44392
- addNodeElement( 'loop', ( returns, ...params ) => bypass( returns, loop( ...params ) ) );
44393
-
44394
44399
  addNodeClass( 'LoopNode', LoopNode );
44395
44400
 
44396
44401
  const _morphTextures = new WeakMap();
44397
44402
  const _morphVec4 = /*@__PURE__*/ new Vector4();
44398
44403
 
44399
- const getMorph = tslFn( ( { bufferMap, influence, stride, width, depth, offset } ) => {
44404
+ const getMorph = Fn( ( { bufferMap, influence, stride, width, depth, offset } ) => {
44400
44405
 
44401
44406
  const texelIndex = int( vertexIndex ).mul( stride ).add( offset );
44402
44407
 
@@ -44568,7 +44573,7 @@ class MorphNode extends Node {
44568
44573
 
44569
44574
  const width = int( size.width );
44570
44575
 
44571
- loop( morphTargetsCount, ( { i } ) => {
44576
+ Loop( morphTargetsCount, ( { i } ) => {
44572
44577
 
44573
44578
  const influence = float( 0 ).toVar();
44574
44579
 
@@ -44654,13 +44659,13 @@ class LightingNode extends Node {
44654
44659
 
44655
44660
  addNodeClass( 'LightingNode', LightingNode );
44656
44661
 
44657
- const BasicShadowMap = tslFn( ( { depthTexture, shadowCoord } ) => {
44662
+ const BasicShadowMap = Fn( ( { depthTexture, shadowCoord } ) => {
44658
44663
 
44659
44664
  return texture( depthTexture, shadowCoord.xy ).compare( shadowCoord.z );
44660
44665
 
44661
44666
  } );
44662
44667
 
44663
- const PCFShadowMap = tslFn( ( { depthTexture, shadowCoord, shadow } ) => {
44668
+ const PCFShadowMap = Fn( ( { depthTexture, shadowCoord, shadow } ) => {
44664
44669
 
44665
44670
  const depthCompare = ( uv, compare ) => texture( depthTexture, uv ).compare( compare );
44666
44671
 
@@ -44699,7 +44704,7 @@ const PCFShadowMap = tslFn( ( { depthTexture, shadowCoord, shadow } ) => {
44699
44704
 
44700
44705
  } );
44701
44706
 
44702
- const PCFSoftShadowMap = tslFn( ( { depthTexture, shadowCoord, shadow } ) => {
44707
+ const PCFSoftShadowMap = Fn( ( { depthTexture, shadowCoord, shadow } ) => {
44703
44708
 
44704
44709
  const depthCompare = ( uv, compare ) => texture( depthTexture, uv ).compare( compare );
44705
44710
 
@@ -44863,7 +44868,7 @@ class AnalyticLightNode extends LightingNode {
44863
44868
  }
44864
44869
 
44865
44870
  const shadowColor = texture( shadowMap.texture, shadowCoord );
44866
- const shadowNode = frustumTest.cond( filterFn( { depthTexture, shadowCoord, shadow } ), float( 1 ) );
44871
+ const shadowNode = frustumTest.select( filterFn( { depthTexture, shadowCoord, shadow } ), float( 1 ) );
44867
44872
 
44868
44873
  this.shadowMap = shadowMap;
44869
44874
 
@@ -45649,7 +45654,7 @@ class ClippingNode extends Node {
45649
45654
 
45650
45655
  setupAlphaToCoverage( planes, numClippingPlanes, numUnionClippingPlanes ) {
45651
45656
 
45652
- return tslFn( () => {
45657
+ return Fn( () => {
45653
45658
 
45654
45659
  const clippingPlanes = uniformArray( planes );
45655
45660
 
@@ -45662,7 +45667,7 @@ class ClippingNode extends Node {
45662
45667
 
45663
45668
  let plane;
45664
45669
 
45665
- loop( numUnionClippingPlanes, ( { i } ) => {
45670
+ Loop( numUnionClippingPlanes, ( { i } ) => {
45666
45671
 
45667
45672
  plane = clippingPlanes.element( i );
45668
45673
 
@@ -45681,7 +45686,7 @@ class ClippingNode extends Node {
45681
45686
 
45682
45687
  unionClipOpacity.assign( 1 );
45683
45688
 
45684
- loop( { start: numUnionClippingPlanes, end: numClippingPlanes }, ( { i } ) => {
45689
+ Loop( { start: numUnionClippingPlanes, end: numClippingPlanes }, ( { i } ) => {
45685
45690
 
45686
45691
  plane = clippingPlanes.element( i );
45687
45692
 
@@ -45706,13 +45711,13 @@ class ClippingNode extends Node {
45706
45711
 
45707
45712
  setupDefault( planes, numClippingPlanes, numUnionClippingPlanes ) {
45708
45713
 
45709
- return tslFn( () => {
45714
+ return Fn( () => {
45710
45715
 
45711
45716
  const clippingPlanes = uniformArray( planes );
45712
45717
 
45713
45718
  let plane;
45714
45719
 
45715
- loop( numUnionClippingPlanes, ( { i } ) => {
45720
+ Loop( numUnionClippingPlanes, ( { i } ) => {
45716
45721
 
45717
45722
  plane = clippingPlanes.element( i );
45718
45723
  positionView.dot( plane.xyz ).greaterThan( plane.w ).discard();
@@ -45725,7 +45730,7 @@ class ClippingNode extends Node {
45725
45730
 
45726
45731
  clipped.assign( true );
45727
45732
 
45728
- loop( { start: numUnionClippingPlanes, end: numClippingPlanes }, ( { i } ) => {
45733
+ Loop( { start: numUnionClippingPlanes, end: numClippingPlanes }, ( { i } ) => {
45729
45734
 
45730
45735
  plane = clippingPlanes.element( i );
45731
45736
  clipped.assign( positionView.dot( plane.xyz ).greaterThan( plane.w ).and( clipped ) );
@@ -45829,7 +45834,7 @@ class NodeMaterial extends Material {
45829
45834
 
45830
45835
  customProgramCacheKey() {
45831
45836
 
45832
- return this.type + getCacheKey( this );
45837
+ return this.type + getCacheKey$1( this );
45833
45838
 
45834
45839
  }
45835
45840
 
@@ -46813,12 +46818,23 @@ class CondNode extends Node {
46813
46818
 
46814
46819
  }
46815
46820
 
46816
- const cond = nodeProxy( CondNode );
46821
+ const select = nodeProxy( CondNode );
46817
46822
 
46818
- addNodeElement( 'cond', cond );
46823
+ addNodeElement( 'select', select );
46819
46824
 
46820
46825
  addNodeClass( 'CondNode', CondNode );
46821
46826
 
46827
+ //
46828
+
46829
+ const cond = ( ...params ) => { // @deprecated, r168
46830
+
46831
+ console.warn( 'TSL.CondNode: cond() has been renamed to select().' );
46832
+ return select( ...params );
46833
+
46834
+ };
46835
+
46836
+ addNodeElement( 'cond', cond );
46837
+
46822
46838
  class StackNode extends Node {
46823
46839
 
46824
46840
  constructor( parent = null ) {
@@ -46850,19 +46866,19 @@ class StackNode extends Node {
46850
46866
 
46851
46867
  }
46852
46868
 
46853
- if( boolNode, method ) {
46869
+ If( boolNode, method ) {
46854
46870
 
46855
46871
  const methodNode = new ShaderNode( method );
46856
- this._currentCond = cond( boolNode, methodNode );
46872
+ this._currentCond = select( boolNode, methodNode );
46857
46873
 
46858
46874
  return this.add( this._currentCond );
46859
46875
 
46860
46876
  }
46861
46877
 
46862
- elseif( boolNode, method ) {
46878
+ ElseIf( boolNode, method ) {
46863
46879
 
46864
46880
  const methodNode = new ShaderNode( method );
46865
- const ifNode = cond( boolNode, methodNode );
46881
+ const ifNode = select( boolNode, methodNode );
46866
46882
 
46867
46883
  this._currentCond.elseNode = ifNode;
46868
46884
  this._currentCond = ifNode;
@@ -46871,7 +46887,7 @@ class StackNode extends Node {
46871
46887
 
46872
46888
  }
46873
46889
 
46874
- else( method ) {
46890
+ Else( method ) {
46875
46891
 
46876
46892
  this._currentCond.elseNode = new ShaderNode( method );
46877
46893
 
@@ -46897,6 +46913,22 @@ class StackNode extends Node {
46897
46913
 
46898
46914
  }
46899
46915
 
46916
+ //
46917
+
46918
+ else( ...params ) { // @deprecated, r168
46919
+
46920
+ console.warn( 'TSL.StackNode: .else() has been renamed to .Else().' );
46921
+ return this.Else( ...params );
46922
+
46923
+ }
46924
+
46925
+ elseif( ...params ) { // @deprecated, r168
46926
+
46927
+ console.warn( 'TSL.StackNode: .elseif() has been renamed to .ElseIf().' );
46928
+ return this.ElseIf( ...params );
46929
+
46930
+ }
46931
+
46900
46932
  }
46901
46933
 
46902
46934
  const stack = nodeProxy( StackNode );
@@ -47008,7 +47040,7 @@ const cubeUV_minTileSize = float( 16.0 );
47008
47040
  // a cubemap, the 0-5 integer index of a cube face, and the direction vector for
47009
47041
  // sampling a textureCube (not generally normalized ).
47010
47042
 
47011
- const getFace = tslFn( ( [ direction ] ) => {
47043
+ const getFace = Fn( ( [ direction ] ) => {
47012
47044
 
47013
47045
  const absDirection = vec3( abs( direction ) ).toVar();
47014
47046
  const face = float( - 1.0 ).toVar();
@@ -47017,23 +47049,23 @@ const getFace = tslFn( ( [ direction ] ) => {
47017
47049
 
47018
47050
  If( absDirection.x.greaterThan( absDirection.y ), () => {
47019
47051
 
47020
- face.assign( cond( direction.x.greaterThan( 0.0 ), 0.0, 3.0 ) );
47052
+ face.assign( select( direction.x.greaterThan( 0.0 ), 0.0, 3.0 ) );
47021
47053
 
47022
- } ).else( () => {
47054
+ } ).Else( () => {
47023
47055
 
47024
- face.assign( cond( direction.y.greaterThan( 0.0 ), 1.0, 4.0 ) );
47056
+ face.assign( select( direction.y.greaterThan( 0.0 ), 1.0, 4.0 ) );
47025
47057
 
47026
47058
  } );
47027
47059
 
47028
- } ).else( () => {
47060
+ } ).Else( () => {
47029
47061
 
47030
47062
  If( absDirection.z.greaterThan( absDirection.y ), () => {
47031
47063
 
47032
- face.assign( cond( direction.z.greaterThan( 0.0 ), 2.0, 5.0 ) );
47064
+ face.assign( select( direction.z.greaterThan( 0.0 ), 2.0, 5.0 ) );
47033
47065
 
47034
- } ).else( () => {
47066
+ } ).Else( () => {
47035
47067
 
47036
- face.assign( cond( direction.y.greaterThan( 0.0 ), 1.0, 4.0 ) );
47068
+ face.assign( select( direction.y.greaterThan( 0.0 ), 1.0, 4.0 ) );
47037
47069
 
47038
47070
  } );
47039
47071
 
@@ -47050,7 +47082,7 @@ const getFace = tslFn( ( [ direction ] ) => {
47050
47082
  } );
47051
47083
 
47052
47084
  // RH coordinate system; PMREM face-indexing convention
47053
- const getUV = tslFn( ( [ direction, face ] ) => {
47085
+ const getUV = Fn( ( [ direction, face ] ) => {
47054
47086
 
47055
47087
  const uv = vec2().toVar();
47056
47088
 
@@ -47058,23 +47090,23 @@ const getUV = tslFn( ( [ direction, face ] ) => {
47058
47090
 
47059
47091
  uv.assign( vec2( direction.z, direction.y ).div( abs( direction.x ) ) ); // pos x
47060
47092
 
47061
- } ).elseif( face.equal( 1.0 ), () => {
47093
+ } ).ElseIf( face.equal( 1.0 ), () => {
47062
47094
 
47063
47095
  uv.assign( vec2( direction.x.negate(), direction.z.negate() ).div( abs( direction.y ) ) ); // pos y
47064
47096
 
47065
- } ).elseif( face.equal( 2.0 ), () => {
47097
+ } ).ElseIf( face.equal( 2.0 ), () => {
47066
47098
 
47067
47099
  uv.assign( vec2( direction.x.negate(), direction.y ).div( abs( direction.z ) ) ); // pos z
47068
47100
 
47069
- } ).elseif( face.equal( 3.0 ), () => {
47101
+ } ).ElseIf( face.equal( 3.0 ), () => {
47070
47102
 
47071
47103
  uv.assign( vec2( direction.z.negate(), direction.y ).div( abs( direction.x ) ) ); // neg x
47072
47104
 
47073
- } ).elseif( face.equal( 4.0 ), () => {
47105
+ } ).ElseIf( face.equal( 4.0 ), () => {
47074
47106
 
47075
47107
  uv.assign( vec2( direction.x.negate(), direction.z ).div( abs( direction.y ) ) ); // neg y
47076
47108
 
47077
- } ).else( () => {
47109
+ } ).Else( () => {
47078
47110
 
47079
47111
  uv.assign( vec2( direction.x, direction.y ).div( abs( direction.z ) ) ); // neg z
47080
47112
 
@@ -47091,7 +47123,7 @@ const getUV = tslFn( ( [ direction, face ] ) => {
47091
47123
  ]
47092
47124
  } );
47093
47125
 
47094
- const roughnessToMip = tslFn( ( [ roughness ] ) => {
47126
+ const roughnessToMip = Fn( ( [ roughness ] ) => {
47095
47127
 
47096
47128
  const mip = float( 0.0 ).toVar();
47097
47129
 
@@ -47099,19 +47131,19 @@ const roughnessToMip = tslFn( ( [ roughness ] ) => {
47099
47131
 
47100
47132
  mip.assign( cubeUV_r0.sub( roughness ).mul( cubeUV_m1.sub( cubeUV_m0 ) ).div( cubeUV_r0.sub( cubeUV_r1 ) ).add( cubeUV_m0 ) );
47101
47133
 
47102
- } ).elseif( roughness.greaterThanEqual( cubeUV_r4 ), () => {
47134
+ } ).ElseIf( roughness.greaterThanEqual( cubeUV_r4 ), () => {
47103
47135
 
47104
47136
  mip.assign( cubeUV_r1.sub( roughness ).mul( cubeUV_m4.sub( cubeUV_m1 ) ).div( cubeUV_r1.sub( cubeUV_r4 ) ).add( cubeUV_m1 ) );
47105
47137
 
47106
- } ).elseif( roughness.greaterThanEqual( cubeUV_r5 ), () => {
47138
+ } ).ElseIf( roughness.greaterThanEqual( cubeUV_r5 ), () => {
47107
47139
 
47108
47140
  mip.assign( cubeUV_r4.sub( roughness ).mul( cubeUV_m5.sub( cubeUV_m4 ) ).div( cubeUV_r4.sub( cubeUV_r5 ) ).add( cubeUV_m4 ) );
47109
47141
 
47110
- } ).elseif( roughness.greaterThanEqual( cubeUV_r6 ), () => {
47142
+ } ).ElseIf( roughness.greaterThanEqual( cubeUV_r6 ), () => {
47111
47143
 
47112
47144
  mip.assign( cubeUV_r5.sub( roughness ).mul( cubeUV_m6.sub( cubeUV_m5 ) ).div( cubeUV_r5.sub( cubeUV_r6 ) ).add( cubeUV_m5 ) );
47113
47145
 
47114
- } ).else( () => {
47146
+ } ).Else( () => {
47115
47147
 
47116
47148
  mip.assign( float( - 2.0 ).mul( log2( mul( 1.16, roughness ) ) ) ); // 1.16 = 1.79^0.25
47117
47149
 
@@ -47128,7 +47160,7 @@ const roughnessToMip = tslFn( ( [ roughness ] ) => {
47128
47160
  } );
47129
47161
 
47130
47162
  // RH coordinate system; PMREM face-indexing convention
47131
- const getDirection = tslFn( ( [ uv_immutable, face ] ) => {
47163
+ const getDirection = Fn( ( [ uv_immutable, face ] ) => {
47132
47164
 
47133
47165
  const uv = uv_immutable.toVar();
47134
47166
  uv.assign( mul( 2.0, uv ).sub( 1.0 ) );
@@ -47138,26 +47170,26 @@ const getDirection = tslFn( ( [ uv_immutable, face ] ) => {
47138
47170
 
47139
47171
  direction.assign( direction.zyx ); // ( 1, v, u ) pos x
47140
47172
 
47141
- } ).elseif( face.equal( 1.0 ), () => {
47173
+ } ).ElseIf( face.equal( 1.0 ), () => {
47142
47174
 
47143
47175
  direction.assign( direction.xzy );
47144
47176
  direction.xz.mulAssign( - 1.0 ); // ( -u, 1, -v ) pos y
47145
47177
 
47146
- } ).elseif( face.equal( 2.0 ), () => {
47178
+ } ).ElseIf( face.equal( 2.0 ), () => {
47147
47179
 
47148
47180
  direction.x.mulAssign( - 1.0 ); // ( -u, v, 1 ) pos z
47149
47181
 
47150
- } ).elseif( face.equal( 3.0 ), () => {
47182
+ } ).ElseIf( face.equal( 3.0 ), () => {
47151
47183
 
47152
47184
  direction.assign( direction.zyx );
47153
47185
  direction.xz.mulAssign( - 1.0 ); // ( -1, v, -u ) neg x
47154
47186
 
47155
- } ).elseif( face.equal( 4.0 ), () => {
47187
+ } ).ElseIf( face.equal( 4.0 ), () => {
47156
47188
 
47157
47189
  direction.assign( direction.xzy );
47158
47190
  direction.xy.mulAssign( - 1.0 ); // ( -u, -1, v ) neg y
47159
47191
 
47160
- } ).elseif( face.equal( 5.0 ), () => {
47192
+ } ).ElseIf( face.equal( 5.0 ), () => {
47161
47193
 
47162
47194
  direction.z.mulAssign( - 1.0 ); // ( u, v, -1 ) neg zS
47163
47195
 
@@ -47176,7 +47208,7 @@ const getDirection = tslFn( ( [ uv_immutable, face ] ) => {
47176
47208
 
47177
47209
  //
47178
47210
 
47179
- const textureCubeUV = tslFn( ( [ envMap, sampleDir_immutable, roughness_immutable, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP ] ) => {
47211
+ const textureCubeUV = Fn( ( [ envMap, sampleDir_immutable, roughness_immutable, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP ] ) => {
47180
47212
 
47181
47213
  const roughness = float( roughness_immutable );
47182
47214
  const sampleDir = vec3( sampleDir_immutable );
@@ -47198,7 +47230,7 @@ const textureCubeUV = tslFn( ( [ envMap, sampleDir_immutable, roughness_immutabl
47198
47230
 
47199
47231
  } );
47200
47232
 
47201
- const bilinearCubeUV = tslFn( ( [ envMap, direction_immutable, mipInt_immutable, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP ] ) => {
47233
+ const bilinearCubeUV = Fn( ( [ envMap, direction_immutable, mipInt_immutable, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP ] ) => {
47202
47234
 
47203
47235
  const mipInt = float( mipInt_immutable ).toVar();
47204
47236
  const direction = vec3( direction_immutable );
@@ -47225,7 +47257,7 @@ const bilinearCubeUV = tslFn( ( [ envMap, direction_immutable, mipInt_immutable,
47225
47257
 
47226
47258
  } );
47227
47259
 
47228
- const getSample = tslFn( ( { envMap, mipInt, outputDirection, theta, axis, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) => {
47260
+ const getSample = Fn( ( { envMap, mipInt, outputDirection, theta, axis, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) => {
47229
47261
 
47230
47262
  const cosTheta = cos( theta );
47231
47263
 
@@ -47238,9 +47270,9 @@ const getSample = tslFn( ( { envMap, mipInt, outputDirection, theta, axis, CUBEU
47238
47270
 
47239
47271
  } );
47240
47272
 
47241
- const blur = tslFn( ( { n, latitudinal, poleAxis, outputDirection, weights, samples, dTheta, mipInt, envMap, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) => {
47273
+ const blur = Fn( ( { n, latitudinal, poleAxis, outputDirection, weights, samples, dTheta, mipInt, envMap, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) => {
47242
47274
 
47243
- const axis = vec3( cond( latitudinal, poleAxis, cross( poleAxis, outputDirection ) ) ).toVar();
47275
+ const axis = vec3( select( latitudinal, poleAxis, cross( poleAxis, outputDirection ) ) ).toVar();
47244
47276
 
47245
47277
  If( all( axis.equals( vec3( 0.0 ) ) ), () => {
47246
47278
 
@@ -47253,7 +47285,7 @@ const blur = tslFn( ( { n, latitudinal, poleAxis, outputDirection, weights, samp
47253
47285
  const gl_FragColor = vec3().toVar();
47254
47286
  gl_FragColor.addAssign( weights.element( int( 0 ) ).mul( getSample( { theta: 0.0, axis, outputDirection, mipInt, envMap, CUBEUV_TEXEL_WIDTH, CUBEUV_TEXEL_HEIGHT, CUBEUV_MAX_MIP } ) ) );
47255
47287
 
47256
- loop( { start: int( 1 ), end: n }, ( { i } ) => {
47288
+ Loop( { start: int( 1 ), end: n }, ( { i } ) => {
47257
47289
 
47258
47290
  If( i.greaterThanEqual( samples ), () => {
47259
47291
 
@@ -49779,26 +49811,26 @@ addNodeElement( 'sinc', sinc );
49779
49811
  // https://github.com/cabbibo/glsl-tri-noise-3d
49780
49812
 
49781
49813
 
49782
- const tri = tslFn( ( [ x ] ) => {
49814
+ const tri = Fn( ( [ x ] ) => {
49783
49815
 
49784
49816
  return x.fract().sub( .5 ).abs();
49785
49817
 
49786
49818
  } );
49787
49819
 
49788
- const tri3 = tslFn( ( [ p ] ) => {
49820
+ const tri3 = Fn( ( [ p ] ) => {
49789
49821
 
49790
49822
  return vec3( tri( p.z.add( tri( p.y.mul( 1. ) ) ) ), tri( p.z.add( tri( p.x.mul( 1. ) ) ) ), tri( p.y.add( tri( p.x.mul( 1. ) ) ) ) );
49791
49823
 
49792
49824
  } );
49793
49825
 
49794
- const triNoise3D = tslFn( ( [ p_immutable, spd, time ] ) => {
49826
+ const triNoise3D = Fn( ( [ p_immutable, spd, time ] ) => {
49795
49827
 
49796
49828
  const p = vec3( p_immutable ).toVar();
49797
49829
  const z = float( 1.4 ).toVar();
49798
49830
  const rz = float( 0.0 ).toVar();
49799
49831
  const bp = vec3( p ).toVar();
49800
49832
 
49801
- loop( { start: float( 0.0 ), end: float( 3.0 ), type: 'float', condition: '<=' }, () => {
49833
+ Loop( { start: float( 0.0 ), end: float( 3.0 ), type: 'float', condition: '<=' }, () => {
49802
49834
 
49803
49835
  const dg = vec3( tri3( bp.mul( 2.0 ) ) ).toVar();
49804
49836
  p.addAssign( dg.add( time.mul( float( 0.1 ).mul( spd ) ) ) );
@@ -50234,13 +50266,13 @@ addNodeElement( 'remapClamp', remapClamp );
50234
50266
 
50235
50267
  addNodeClass( 'RemapNode', RemapNode );
50236
50268
 
50237
- const rotateUV = tslFn( ( [ uv, rotation, center = vec2( 0.5 ) ] ) => {
50269
+ const rotateUV = Fn( ( [ uv, rotation, center = vec2( 0.5 ) ] ) => {
50238
50270
 
50239
50271
  return uv.sub( center ).rotate( rotation ).add( center );
50240
50272
 
50241
50273
  } );
50242
50274
 
50243
- const spherizeUV = tslFn( ( [ uv, strength, center = vec2( 0.5 ) ] ) => {
50275
+ const spherizeUV = Fn( ( [ uv, strength, center = vec2( 0.5 ) ] ) => {
50244
50276
 
50245
50277
  const delta = uv.sub( center );
50246
50278
  const delta2 = delta.dot( delta );
@@ -50254,7 +50286,7 @@ const spherizeUV = tslFn( ( [ uv, strength, center = vec2( 0.5 ) ] ) => {
50254
50286
  addNodeElement( 'rotateUV', rotateUV );
50255
50287
  addNodeElement( 'spherizeUV', spherizeUV );
50256
50288
 
50257
- const billboarding = tslFn( ( { position = null, horizontal = true, vertical = false } ) => {
50289
+ const billboarding = Fn( ( { position = null, horizontal = true, vertical = false } ) => {
50258
50290
 
50259
50291
  let worldMatrix;
50260
50292
 
@@ -50297,11 +50329,11 @@ const billboarding = tslFn( ( { position = null, horizontal = true, vertical = f
50297
50329
 
50298
50330
  } );
50299
50331
 
50300
- const viewportSafeUV = tslFn( ( [ uv = null ] ) => {
50332
+ const viewportSafeUV = Fn( ( [ uv = null ] ) => {
50301
50333
 
50302
50334
  const depth = linearDepth();
50303
50335
  const depthDiff = linearDepth( viewportDepthTexture( uv ) ).sub( depth );
50304
- const finalUV = depthDiff.lessThan( 0 ).cond( viewportTopLeft, uv );
50336
+ const finalUV = depthDiff.lessThan( 0 ).select( viewportTopLeft, uv );
50305
50337
 
50306
50338
  return finalUV;
50307
50339
 
@@ -51483,7 +51515,8 @@ const GPUFeatureName = {
51483
51515
  BGRA8UNormStorage: 'bgra8unorm-storage',
51484
51516
  Float32Filterable: 'float32-filterable',
51485
51517
  ClipDistances: 'clip-distances',
51486
- DualSourceBlending: 'dual-source-blending'
51518
+ DualSourceBlending: 'dual-source-blending',
51519
+ Subgroups: 'subgroups'
51487
51520
  };
51488
51521
 
51489
51522
  class StorageBufferNode extends BufferNode {
@@ -51705,7 +51738,7 @@ const textureStore = ( value, uvNode, storeNode ) => {
51705
51738
 
51706
51739
  addNodeClass( 'StorageTextureNode', StorageTextureNode );
51707
51740
 
51708
- const normal = tslFn( ( { texture, uv } ) => {
51741
+ const normal = Fn( ( { texture, uv } ) => {
51709
51742
 
51710
51743
  const epsilon = 0.0001;
51711
51744
 
@@ -51715,27 +51748,27 @@ const normal = tslFn( ( { texture, uv } ) => {
51715
51748
 
51716
51749
  ret.assign( vec3( 1, 0, 0 ) );
51717
51750
 
51718
- } ).elseif( uv.y.lessThan( epsilon ), () => {
51751
+ } ).ElseIf( uv.y.lessThan( epsilon ), () => {
51719
51752
 
51720
51753
  ret.assign( vec3( 0, 1, 0 ) );
51721
51754
 
51722
- } ).elseif( uv.z.lessThan( epsilon ), () => {
51755
+ } ).ElseIf( uv.z.lessThan( epsilon ), () => {
51723
51756
 
51724
51757
  ret.assign( vec3( 0, 0, 1 ) );
51725
51758
 
51726
- } ).elseif( uv.x.greaterThan( 1 - epsilon ), () => {
51759
+ } ).ElseIf( uv.x.greaterThan( 1 - epsilon ), () => {
51727
51760
 
51728
51761
  ret.assign( vec3( - 1, 0, 0 ) );
51729
51762
 
51730
- } ).elseif( uv.y.greaterThan( 1 - epsilon ), () => {
51763
+ } ).ElseIf( uv.y.greaterThan( 1 - epsilon ), () => {
51731
51764
 
51732
51765
  ret.assign( vec3( 0, - 1, 0 ) );
51733
51766
 
51734
- } ).elseif( uv.z.greaterThan( 1 - epsilon ), () => {
51767
+ } ).ElseIf( uv.z.greaterThan( 1 - epsilon ), () => {
51735
51768
 
51736
51769
  ret.assign( vec3( 0, 0, - 1 ) );
51737
51770
 
51738
- } ).else( () => {
51771
+ } ).Else( () => {
51739
51772
 
51740
51773
  const step = 0.01;
51741
51774
 
@@ -51824,9 +51857,9 @@ const userData = ( name, inputType, userData ) => nodeObject( new UserDataNode(
51824
51857
 
51825
51858
  addNodeClass( 'UserDataNode', UserDataNode );
51826
51859
 
51827
- const BurnNode = tslFn( ( { base, blend } ) => {
51860
+ const BurnNode = Fn( ( { base, blend } ) => {
51828
51861
 
51829
- const fn = ( c ) => blend[ c ].lessThan( EPSILON ).cond( blend[ c ], base[ c ].oneMinus().div( blend[ c ] ).oneMinus().max( 0 ) );
51862
+ const fn = ( c ) => blend[ c ].lessThan( EPSILON ).select( blend[ c ], base[ c ].oneMinus().div( blend[ c ] ).oneMinus().max( 0 ) );
51830
51863
 
51831
51864
  return vec3( fn( 'x' ), fn( 'y' ), fn( 'z' ) );
51832
51865
 
@@ -51839,9 +51872,9 @@ const BurnNode = tslFn( ( { base, blend } ) => {
51839
51872
  ]
51840
51873
  } );
51841
51874
 
51842
- const DodgeNode = tslFn( ( { base, blend } ) => {
51875
+ const DodgeNode = Fn( ( { base, blend } ) => {
51843
51876
 
51844
- const fn = ( c ) => blend[ c ].equal( 1.0 ).cond( blend[ c ], base[ c ].div( blend[ c ].oneMinus() ).max( 0 ) );
51877
+ const fn = ( c ) => blend[ c ].equal( 1.0 ).select( blend[ c ], base[ c ].div( blend[ c ].oneMinus() ).max( 0 ) );
51845
51878
 
51846
51879
  return vec3( fn( 'x' ), fn( 'y' ), fn( 'z' ) );
51847
51880
 
@@ -51854,7 +51887,7 @@ const DodgeNode = tslFn( ( { base, blend } ) => {
51854
51887
  ]
51855
51888
  } );
51856
51889
 
51857
- const ScreenNode = tslFn( ( { base, blend } ) => {
51890
+ const ScreenNode = Fn( ( { base, blend } ) => {
51858
51891
 
51859
51892
  const fn = ( c ) => base[ c ].oneMinus().mul( blend[ c ].oneMinus() ).oneMinus();
51860
51893
 
@@ -51869,9 +51902,9 @@ const ScreenNode = tslFn( ( { base, blend } ) => {
51869
51902
  ]
51870
51903
  } );
51871
51904
 
51872
- const OverlayNode = tslFn( ( { base, blend } ) => {
51905
+ const OverlayNode = Fn( ( { base, blend } ) => {
51873
51906
 
51874
- const fn = ( c ) => base[ c ].lessThan( 0.5 ).cond( base[ c ].mul( blend[ c ], 2.0 ), base[ c ].oneMinus().mul( blend[ c ].oneMinus() ).oneMinus() );
51907
+ const fn = ( c ) => base[ c ].lessThan( 0.5 ).select( base[ c ].mul( blend[ c ], 2.0 ), base[ c ].oneMinus().mul( blend[ c ].oneMinus() ).oneMinus() );
51875
51908
  //const fn = ( c ) => mix( base[ c ].oneMinus().mul( blend[ c ].oneMinus() ).oneMinus(), base[ c ].mul( blend[ c ], 2.0 ), step( base[ c ], 0.5 ) );
51876
51909
 
51877
51910
  return vec3( fn( 'x' ), fn( 'y' ), fn( 'z' ) );
@@ -51949,7 +51982,7 @@ addNodeClass( 'BlendModeNode', BlendModeNode );
51949
51982
  // Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen
51950
51983
  // https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf
51951
51984
 
51952
- const dHdxy_fwd = tslFn( ( { textureNode, bumpScale } ) => {
51985
+ const dHdxy_fwd = Fn( ( { textureNode, bumpScale } ) => {
51953
51986
 
51954
51987
  // It's used to preserve the same TextureNode instance
51955
51988
  const sampleTexture = ( callback ) => textureNode.cache().context( { getUV: ( texNode ) => callback( texNode.uvNode || uv() ), forceUVContext: true } );
@@ -51965,7 +51998,7 @@ const dHdxy_fwd = tslFn( ( { textureNode, bumpScale } ) => {
51965
51998
 
51966
51999
  // Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)
51967
52000
 
51968
- const perturbNormalArb = tslFn( ( inputs ) => {
52001
+ const perturbNormalArb = Fn( ( inputs ) => {
51969
52002
 
51970
52003
  const { surf_pos, surf_norm, dHdxy } = inputs;
51971
52004
 
@@ -52017,13 +52050,13 @@ addNodeElement( 'bumpMap', bumpMap );
52017
52050
 
52018
52051
  addNodeClass( 'BumpMapNode', BumpMapNode );
52019
52052
 
52020
- const saturationNode = tslFn( ( { color, adjustment } ) => {
52053
+ const saturationNode = Fn( ( { color, adjustment } ) => {
52021
52054
 
52022
52055
  return adjustment.mix( luminance( color.rgb ), color.rgb );
52023
52056
 
52024
52057
  } );
52025
52058
 
52026
- const vibranceNode = tslFn( ( { color, adjustment } ) => {
52059
+ const vibranceNode = Fn( ( { color, adjustment } ) => {
52027
52060
 
52028
52061
  const average = add( color.r, color.g, color.b ).div( 3.0 );
52029
52062
 
@@ -52034,7 +52067,7 @@ const vibranceNode = tslFn( ( { color, adjustment } ) => {
52034
52067
 
52035
52068
  } );
52036
52069
 
52037
- const hueNode = tslFn( ( { color, adjustment } ) => {
52070
+ const hueNode = Fn( ( { color, adjustment } ) => {
52038
52071
 
52039
52072
  const k = vec3( 0.57735, 0.57735, 0.57735 );
52040
52073
 
@@ -52115,7 +52148,7 @@ addNodeClass( 'ColorAdjustmentNode', ColorAdjustmentNode );
52115
52148
  // Normal Mapping Without Precomputed Tangents
52116
52149
  // http://www.thetenthplanet.de/archives/1180
52117
52150
 
52118
- const perturbNormal2Arb = tslFn( ( inputs ) => {
52151
+ const perturbNormal2Arb = Fn( ( inputs ) => {
52119
52152
 
52120
52153
  const { eye_pos, surf_norm, mapN, uv } = inputs;
52121
52154
 
@@ -52231,14 +52264,14 @@ addNodeElement( 'posterize', posterize );
52231
52264
  addNodeClass( 'PosterizeNode', PosterizeNode );
52232
52265
 
52233
52266
  // exposure only
52234
- const LinearToneMappingNode = tslFn( ( { color, exposure } ) => {
52267
+ const LinearToneMappingNode = Fn( ( { color, exposure } ) => {
52235
52268
 
52236
52269
  return color.mul( exposure ).clamp();
52237
52270
 
52238
52271
  } );
52239
52272
 
52240
52273
  // source: https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf
52241
- const ReinhardToneMappingNode = tslFn( ( { color, exposure } ) => {
52274
+ const ReinhardToneMappingNode = Fn( ( { color, exposure } ) => {
52242
52275
 
52243
52276
  color = color.mul( exposure );
52244
52277
 
@@ -52247,7 +52280,7 @@ const ReinhardToneMappingNode = tslFn( ( { color, exposure } ) => {
52247
52280
  } );
52248
52281
 
52249
52282
  // source: http://filmicworlds.com/blog/filmic-tonemapping-operators/
52250
- const OptimizedCineonToneMappingNode = tslFn( ( { color, exposure } ) => {
52283
+ const OptimizedCineonToneMappingNode = Fn( ( { color, exposure } ) => {
52251
52284
 
52252
52285
  // optimized filmic operator by Jim Hejl and Richard Burgess-Dawson
52253
52286
  color = color.mul( exposure );
@@ -52261,7 +52294,7 @@ const OptimizedCineonToneMappingNode = tslFn( ( { color, exposure } ) => {
52261
52294
  } );
52262
52295
 
52263
52296
  // source: https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs
52264
- const RRTAndODTFit = tslFn( ( { color } ) => {
52297
+ const RRTAndODTFit = Fn( ( { color } ) => {
52265
52298
 
52266
52299
  const a = color.mul( color.add( 0.0245786 ) ).sub( 0.000090537 );
52267
52300
  const b = color.mul( color.add( 0.4329510 ).mul( 0.983729 ) ).add( 0.238081 );
@@ -52271,7 +52304,7 @@ const RRTAndODTFit = tslFn( ( { color } ) => {
52271
52304
  } );
52272
52305
 
52273
52306
  // source: https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs
52274
- const ACESFilmicToneMappingNode = tslFn( ( { color, exposure } ) => {
52307
+ const ACESFilmicToneMappingNode = Fn( ( { color, exposure } ) => {
52275
52308
 
52276
52309
  // sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT
52277
52310
  const ACESInputMat = mat3(
@@ -52306,7 +52339,7 @@ const ACESFilmicToneMappingNode = tslFn( ( { color, exposure } ) => {
52306
52339
  const LINEAR_REC2020_TO_LINEAR_SRGB = mat3( vec3( 1.6605, - 0.1246, - 0.0182 ), vec3( - 0.5876, 1.1329, - 0.1006 ), vec3( - 0.0728, - 0.0083, 1.1187 ) );
52307
52340
  const LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( vec3( 0.6274, 0.0691, 0.0164 ), vec3( 0.3293, 0.9195, 0.0880 ), vec3( 0.0433, 0.0113, 0.8956 ) );
52308
52341
 
52309
- const agxDefaultContrastApprox = tslFn( ( [ x_immutable ] ) => {
52342
+ const agxDefaultContrastApprox = Fn( ( [ x_immutable ] ) => {
52310
52343
 
52311
52344
  const x = vec3( x_immutable ).toVar();
52312
52345
  const x2 = vec3( x.mul( x ) ).toVar();
@@ -52316,7 +52349,7 @@ const agxDefaultContrastApprox = tslFn( ( [ x_immutable ] ) => {
52316
52349
 
52317
52350
  } );
52318
52351
 
52319
- const AGXToneMappingNode = tslFn( ( { color, exposure } ) => {
52352
+ const AGXToneMappingNode = Fn( ( { color, exposure } ) => {
52320
52353
 
52321
52354
  const colortone = vec3( color ).toVar();
52322
52355
  const AgXInsetMatrix = mat3( vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) );
@@ -52342,7 +52375,7 @@ const AGXToneMappingNode = tslFn( ( { color, exposure } ) => {
52342
52375
 
52343
52376
  // https://modelviewer.dev/examples/tone-mapping
52344
52377
 
52345
- const NeutralToneMappingNode = tslFn( ( { color, exposure } ) => {
52378
+ const NeutralToneMappingNode = Fn( ( { color, exposure } ) => {
52346
52379
 
52347
52380
  const StartCompression = float( 0.8 - 0.04 );
52348
52381
  const Desaturation = float( 0.15 );
@@ -52350,7 +52383,7 @@ const NeutralToneMappingNode = tslFn( ( { color, exposure } ) => {
52350
52383
  color = color.mul( exposure );
52351
52384
 
52352
52385
  const x = min$1( color.r, min$1( color.g, color.b ) );
52353
- const offset = cond( x.lessThan( 0.08 ), x.sub( mul( 6.25, x.mul( x ) ) ), 0.04 );
52386
+ const offset = select( x.lessThan( 0.08 ), x.sub( mul( 6.25, x.mul( x ) ) ), 0.04 );
52354
52387
 
52355
52388
  color.subAssign( offset );
52356
52389
 
@@ -52508,17 +52541,24 @@ class PassTextureNode extends TextureNode {
52508
52541
 
52509
52542
  class PassMultipleTextureNode extends PassTextureNode {
52510
52543
 
52511
- constructor( passNode, textureName ) {
52544
+ constructor( passNode, textureName, previousTexture = false ) {
52512
52545
 
52513
52546
  super( passNode, null );
52514
52547
 
52515
52548
  this.textureName = textureName;
52549
+ this.previousTexture = previousTexture;
52550
+
52551
+ }
52552
+
52553
+ updateTexture() {
52554
+
52555
+ this.value = this.previousTexture ? this.passNode.getPreviousTexture( this.textureName ) : this.passNode.getTexture( this.textureName );
52516
52556
 
52517
52557
  }
52518
52558
 
52519
52559
  setup( builder ) {
52520
52560
 
52521
- this.value = this.passNode.getTexture( this.textureName );
52561
+ this.updateTexture();
52522
52562
 
52523
52563
  return super.setup( builder );
52524
52564
 
@@ -52526,7 +52566,7 @@ class PassMultipleTextureNode extends PassTextureNode {
52526
52566
 
52527
52567
  clone() {
52528
52568
 
52529
- return new this.constructor( this.passNode, this.textureName );
52569
+ return new this.constructor( this.passNode, this.textureName, this.previousTexture );
52530
52570
 
52531
52571
  }
52532
52572
 
@@ -52569,6 +52609,9 @@ class PassNode extends TempNode {
52569
52609
  this._linearDepthNodes = {};
52570
52610
  this._viewZNodes = {};
52571
52611
 
52612
+ this._previousTextures = {};
52613
+ this._previousTextureNodes = {};
52614
+
52572
52615
  this._cameraNear = uniform( 0 );
52573
52616
  this._cameraFar = uniform( 0 );
52574
52617
 
@@ -52620,6 +52663,44 @@ class PassNode extends TempNode {
52620
52663
 
52621
52664
  }
52622
52665
 
52666
+ getPreviousTexture( name ) {
52667
+
52668
+ let texture = this._previousTextures[ name ];
52669
+
52670
+ if ( texture === undefined ) {
52671
+
52672
+ texture = this.getTexture( name ).clone();
52673
+ texture.isRenderTargetTexture = true;
52674
+
52675
+ this._previousTextures[ name ] = texture;
52676
+
52677
+ }
52678
+
52679
+ return texture;
52680
+
52681
+ }
52682
+
52683
+ toggleTexture( name ) {
52684
+
52685
+ const prevTexture = this._previousTextures[ name ];
52686
+
52687
+ if ( prevTexture !== undefined ) {
52688
+
52689
+ const texture = this._textures[ name ];
52690
+
52691
+ const index = this.renderTarget.textures.indexOf( texture );
52692
+ this.renderTarget.textures[ index ] = prevTexture;
52693
+
52694
+ this._textures[ name ] = prevTexture;
52695
+ this._previousTextures[ name ] = texture;
52696
+
52697
+ this._textureNodes[ name ].updateTexture();
52698
+ this._previousTextureNodes[ name ].updateTexture();
52699
+
52700
+ }
52701
+
52702
+ }
52703
+
52623
52704
  getTextureNode( name = 'output' ) {
52624
52705
 
52625
52706
  let textureNode = this._textureNodes[ name ];
@@ -52634,6 +52715,20 @@ class PassNode extends TempNode {
52634
52715
 
52635
52716
  }
52636
52717
 
52718
+ getPreviousTextureNode( name = 'output' ) {
52719
+
52720
+ let textureNode = this._previousTextureNodes[ name ];
52721
+
52722
+ if ( textureNode === undefined ) {
52723
+
52724
+ this._previousTextureNodes[ name ] = textureNode = nodeObject( new PassMultipleTextureNode( this, name, true ) );
52725
+
52726
+ }
52727
+
52728
+ return textureNode;
52729
+
52730
+ }
52731
+
52637
52732
  getViewZNode( name = 'depth' ) {
52638
52733
 
52639
52734
  let viewZNode = this._viewZNodes[ name ];
@@ -52705,6 +52800,12 @@ class PassNode extends TempNode {
52705
52800
  this._cameraNear.value = camera.near;
52706
52801
  this._cameraFar.value = camera.far;
52707
52802
 
52803
+ for ( const name in this._previousTextures ) {
52804
+
52805
+ this.toggleTexture( name );
52806
+
52807
+ }
52808
+
52708
52809
  renderer.setRenderTarget( this.renderTarget );
52709
52810
  renderer.setMRT( this._mrt );
52710
52811
 
@@ -52872,7 +52973,7 @@ class GaussianBlurNode extends TempNode {
52872
52973
 
52873
52974
  const sampleTexture = ( uv ) => textureNode.uv( uv );
52874
52975
 
52875
- const blur = tslFn( () => {
52976
+ const blur = Fn( () => {
52876
52977
 
52877
52978
  const kernelSize = 3 + ( 2 * this.sigma );
52878
52979
  const gaussianCoefficients = this._getCoefficients( kernelSize );
@@ -53033,7 +53134,7 @@ class AfterImageNode extends TempNode {
53033
53134
 
53034
53135
  const sampleTexture = ( uv ) => textureNode.uv( uv );
53035
53136
 
53036
- const when_gt = tslFn( ( [ x_immutable, y_immutable ] ) => {
53137
+ const when_gt = Fn( ( [ x_immutable, y_immutable ] ) => {
53037
53138
 
53038
53139
  const y = float( y_immutable ).toVar();
53039
53140
  const x = vec4( x_immutable ).toVar();
@@ -53042,7 +53143,7 @@ class AfterImageNode extends TempNode {
53042
53143
 
53043
53144
  } );
53044
53145
 
53045
- const afterImg = tslFn( () => {
53146
+ const afterImg = Fn( () => {
53046
53147
 
53047
53148
  const texelOld = vec4( textureNodeOld );
53048
53149
  const texelNew = vec4( sampleTexture( uvNode ) );
@@ -53162,14 +53263,14 @@ class AnamorphicNode extends TempNode {
53162
53263
 
53163
53264
  const sampleTexture = ( uv ) => textureNode.uv( uv );
53164
53265
 
53165
- const anamorph = tslFn( () => {
53266
+ const anamorph = Fn( () => {
53166
53267
 
53167
53268
  const samples = this.samples;
53168
53269
  const halfSamples = Math.floor( samples / 2 );
53169
53270
 
53170
53271
  const total = vec3( 0 ).toVar();
53171
53272
 
53172
- loop( { start: - halfSamples, end: halfSamples }, ( { i } ) => {
53273
+ Loop( { start: - halfSamples, end: halfSamples }, ( { i } ) => {
53173
53274
 
53174
53275
  const softness = float( i ).abs().div( halfSamples ).oneMinus();
53175
53276
 
@@ -53243,7 +53344,7 @@ class SobelOperatorNode extends TempNode {
53243
53344
 
53244
53345
  const sampleTexture = ( uv ) => textureNode.uv( uv );
53245
53346
 
53246
- const sobel = tslFn( () => {
53347
+ const sobel = Fn( () => {
53247
53348
 
53248
53349
  // Sobel Edge Detection (see https://youtu.be/uihBwtPIBxM)
53249
53350
 
@@ -53357,7 +53458,7 @@ class DepthOfFieldNode extends TempNode {
53357
53458
 
53358
53459
  const sampleTexture = ( uv ) => textureNode.uv( uv );
53359
53460
 
53360
- const dof = tslFn( () => {
53461
+ const dof = Fn( () => {
53361
53462
 
53362
53463
  const aspectcorrect = vec2( 1.0, this._aspect );
53363
53464
 
@@ -53463,7 +53564,7 @@ class DotScreenNode extends TempNode {
53463
53564
 
53464
53565
  const inputNode = this.inputNode;
53465
53566
 
53466
- const pattern = tslFn( () => {
53567
+ const pattern = Fn( () => {
53467
53568
 
53468
53569
  const s = sin( this.angle );
53469
53570
  const c = cos( this.angle );
@@ -53475,7 +53576,7 @@ class DotScreenNode extends TempNode {
53475
53576
 
53476
53577
  } );
53477
53578
 
53478
- const dotScreen = tslFn( () => {
53579
+ const dotScreen = Fn( () => {
53479
53580
 
53480
53581
  const color = inputNode;
53481
53582
 
@@ -53517,7 +53618,7 @@ class RGBShiftNode extends TempNode {
53517
53618
 
53518
53619
  const sampleTexture = ( uv ) => textureNode.uv( uv );
53519
53620
 
53520
- const rgbShift = tslFn( () => {
53621
+ const rgbShift = Fn( () => {
53521
53622
 
53522
53623
  const offset = vec2( cos( this.angle ), sin( this.angle ) ).mul( this.amount );
53523
53624
  const cr = sampleTexture( uvNode.add( offset ) );
@@ -53554,7 +53655,7 @@ class FilmNode extends TempNode {
53554
53655
 
53555
53656
  const uvNode = this.uvNode || uv();
53556
53657
 
53557
- const film = tslFn( () => {
53658
+ const film = Fn( () => {
53558
53659
 
53559
53660
  const base = this.inputNode.rgb;
53560
53661
  const noise = rand( fract( uvNode.add( timerLocal() ) ) );
@@ -53602,7 +53703,7 @@ class Lut3DNode extends TempNode {
53602
53703
 
53603
53704
  const sampleLut = ( uv ) => lutNode.uv( uv );
53604
53705
 
53605
- const lut3D = tslFn( () => {
53706
+ const lut3D = Fn( () => {
53606
53707
 
53607
53708
  const base = inputNode;
53608
53709
 
@@ -53719,7 +53820,7 @@ class GTAONode extends TempNode {
53719
53820
  const sampleDepth = ( uv ) => this.depthNode.uv( uv ).x;
53720
53821
  const sampleNoise = ( uv ) => this.noiseNode.uv( uv );
53721
53822
 
53722
- const getSceneUvAndDepth = tslFn( ( [ sampleViewPos ] )=> {
53823
+ const getSceneUvAndDepth = Fn( ( [ sampleViewPos ] )=> {
53723
53824
 
53724
53825
  const sampleClipPos = this.cameraProjectionMatrix.mul( vec4( sampleViewPos, 1.0 ) );
53725
53826
  let sampleUv = sampleClipPos.xy.div( sampleClipPos.w ).mul( 0.5 ).add( 0.5 ).toVar();
@@ -53729,7 +53830,7 @@ class GTAONode extends TempNode {
53729
53830
 
53730
53831
  } );
53731
53832
 
53732
- const getViewPosition = tslFn( ( [ screenPosition, depth ] ) => {
53833
+ const getViewPosition = Fn( ( [ screenPosition, depth ] ) => {
53733
53834
 
53734
53835
  screenPosition = vec2( screenPosition.x, screenPosition.y.oneMinus() ).mul( 2.0 ).sub( 1.0 );
53735
53836
 
@@ -53740,7 +53841,7 @@ class GTAONode extends TempNode {
53740
53841
 
53741
53842
  } );
53742
53843
 
53743
- const ao = tslFn( () => {
53844
+ const ao = Fn( () => {
53744
53845
 
53745
53846
  const depth = sampleDepth( uvNode );
53746
53847
 
@@ -53760,12 +53861,12 @@ class GTAONode extends TempNode {
53760
53861
  const bitangent = vec3( tangent.y.mul( - 1.0 ), tangent.x, 0.0 );
53761
53862
  const kernelMatrix = mat3( tangent, bitangent, vec3( 0.0, 0.0, 1.0 ) );
53762
53863
 
53763
- const DIRECTIONS = this.SAMPLES.lessThan( 30 ).cond( 3, 5 );
53864
+ const DIRECTIONS = this.SAMPLES.lessThan( 30 ).select( 3, 5 );
53764
53865
  const STEPS = add( this.SAMPLES, DIRECTIONS.sub( 1 ) ).div( DIRECTIONS );
53765
53866
 
53766
53867
  const ao = float( 0 ).toVar();
53767
53868
 
53768
- loop( { start: int( 0 ), end: DIRECTIONS, type: 'int', condition: '<' }, ( { i } ) => {
53869
+ Loop( { start: int( 0 ), end: DIRECTIONS, type: 'int', condition: '<' }, ( { i } ) => {
53769
53870
 
53770
53871
  const angle = float( i ).div( float( DIRECTIONS ) ).mul( PI );
53771
53872
  const sampleDir = vec4( cos( angle ), sin( angle ), 0., add( 0.5, mul( 0.5, noiseTexel.w ) ) );
@@ -53779,7 +53880,7 @@ class GTAONode extends TempNode {
53779
53880
  const tangentToNormalInSlice = cross( normalInSlice, sliceBitangent );
53780
53881
  const cosHorizons = vec2( dot( viewDir, tangentToNormalInSlice ), dot( viewDir, tangentToNormalInSlice.negate() ) ).toVar();
53781
53882
 
53782
- loop( { end: STEPS, type: 'int', name: 'j', condition: '<' }, ( { j } ) => {
53883
+ Loop( { end: STEPS, type: 'int', name: 'j', condition: '<' }, ( { j } ) => {
53783
53884
 
53784
53885
  const sampleViewOffset = sampleDir.xyz.mul( radiusToUse ).mul( sampleDir.w ).mul( pow( div( float( j ).add( 1.0 ), float( STEPS ) ), this.distanceExponent ) );
53785
53886
 
@@ -53976,7 +54077,7 @@ class DenoiseNode extends TempNode {
53976
54077
  const sampleNormal = ( uv ) => this.normalNode.uv( uv );
53977
54078
  const sampleNoise = ( uv ) => this.noiseNode.uv( uv );
53978
54079
 
53979
- const getViewPosition = tslFn( ( [ screenPosition, depth ] ) => {
54080
+ const getViewPosition = Fn( ( [ screenPosition, depth ] ) => {
53980
54081
 
53981
54082
  screenPosition = vec2( screenPosition.x, screenPosition.y.oneMinus() ).mul( 2.0 ).sub( 1.0 );
53982
54083
 
@@ -53987,7 +54088,7 @@ class DenoiseNode extends TempNode {
53987
54088
 
53988
54089
  } );
53989
54090
 
53990
- const denoiseSample = tslFn( ( [ center, viewNormal, viewPosition, sampleUv ] ) => {
54091
+ const denoiseSample = Fn( ( [ center, viewNormal, viewPosition, sampleUv ] ) => {
53991
54092
 
53992
54093
  const texel = sampleTexture( sampleUv );
53993
54094
  const depth = sampleDepth( sampleUv );
@@ -54007,7 +54108,7 @@ class DenoiseNode extends TempNode {
54007
54108
 
54008
54109
  } );
54009
54110
 
54010
- const denoise = tslFn( ( [ uvNode ] ) => {
54111
+ const denoise = Fn( ( [ uvNode ] ) => {
54011
54112
 
54012
54113
  const depth = sampleDepth( uvNode );
54013
54114
  const viewNormal = sampleNormal( uvNode ).rgb.normalize();
@@ -54038,7 +54139,7 @@ class DenoiseNode extends TempNode {
54038
54139
  const totalWeight = float( 1.0 ).toVar();
54039
54140
  const denoised = vec3( texel.rgb ).toVar();
54040
54141
 
54041
- loop( { start: int( 0 ), end: int( 16 ), type: 'int', condition: '<' }, ( { i } ) => {
54142
+ Loop( { start: int( 0 ), end: int( 16 ), type: 'int', condition: '<' }, ( { i } ) => {
54042
54143
 
54043
54144
  const sampleDir = this._sampleVectors.element( i ).toVar();
54044
54145
  const offset = rotationMatrix.mul( sampleDir.xy.mul( float( 1.0 ).add( sampleDir.z.mul( this.radius.sub( 1 ) ) ) ) ).div( this._resolution ).toVar();
@@ -54067,7 +54168,7 @@ class DenoiseNode extends TempNode {
54067
54168
  ]
54068
54169
  } );
54069
54170
 
54070
- const output = tslFn( () => {
54171
+ const output = Fn( () => {
54071
54172
 
54072
54173
  return denoise( uvNode );
54073
54174
 
@@ -54186,7 +54287,7 @@ class FXAANode extends TempNode {
54186
54287
 
54187
54288
  const NUM_SAMPLES = int( 5 );
54188
54289
 
54189
- const contrast = tslFn( ( [ a_immutable, b_immutable ] ) => {
54290
+ const contrast = Fn( ( [ a_immutable, b_immutable ] ) => {
54190
54291
 
54191
54292
  // assumes colors have premultipliedAlpha, so that the calculated color contrast is scaled by alpha
54192
54293
 
@@ -54200,7 +54301,7 @@ class FXAANode extends TempNode {
54200
54301
 
54201
54302
  // FXAA3 QUALITY - PC
54202
54303
 
54203
- const FxaaPixelShader = tslFn( ( [ uv, fxaaQualityRcpFrame, fxaaQualityEdgeThreshold, fxaaQualityinvEdgeThreshold ] ) => {
54304
+ const FxaaPixelShader = Fn( ( [ uv, fxaaQualityRcpFrame, fxaaQualityEdgeThreshold, fxaaQualityinvEdgeThreshold ] ) => {
54204
54305
 
54205
54306
  const rgbaM = FxaaTexTop( uv ).toVar();
54206
54307
  const rgbaS = FxaaTexOff( uv, vec2( 0.0, - 1.0 ), fxaaQualityRcpFrame.xy ).toVar();
@@ -54239,8 +54340,8 @@ class FXAANode extends TempNode {
54239
54340
 
54240
54341
  // locate the edge
54241
54342
 
54242
- const x = contrastE.greaterThan( contrastW ).cond( 1, - 1 ).toVar();
54243
- const y = contrastS.greaterThan( contrastN ).cond( 1, - 1 ).toVar();
54343
+ const x = contrastE.greaterThan( contrastW ).select( 1, - 1 ).toVar();
54344
+ const y = contrastS.greaterThan( contrastN ).select( 1, - 1 ).toVar();
54244
54345
 
54245
54346
  const dirToEdge = vec2( x, y ).toVar();
54246
54347
  // . 2 . . 1 .
@@ -54293,7 +54394,7 @@ class FXAANode extends TempNode {
54293
54394
  offNP.x.assign( 0 );
54294
54395
  offNP.y.assign( fxaaQualityRcpFrame.y );
54295
54396
 
54296
- } ).else( () => {
54397
+ } ).Else( () => {
54297
54398
 
54298
54399
  offNP.x.assign( fxaaQualityRcpFrame.x );
54299
54400
  offNP.y.assign( 0 );
@@ -54321,7 +54422,7 @@ class FXAANode extends TempNode {
54321
54422
  const iterationsUsedN = int( 0 ).toVar();
54322
54423
  const iterationsUsedP = int( 0 ).toVar();
54323
54424
 
54324
- loop( NUM_SAMPLES, ( { i } ) => {
54425
+ Loop( NUM_SAMPLES, ( { i } ) => {
54325
54426
 
54326
54427
  const increment = i.add( 1 ).toVar();
54327
54428
 
@@ -54412,7 +54513,7 @@ class FXAANode extends TempNode {
54412
54513
  ]
54413
54514
  } );
54414
54515
 
54415
- const fxaa = tslFn( () => {
54516
+ const fxaa = Fn( () => {
54416
54517
 
54417
54518
  const edgeDetectionQuality = float( 0.2 );
54418
54519
  const invEdgeDetectionQuality = float( 1 ).div( edgeDetectionQuality );
@@ -54599,7 +54700,7 @@ class BloomNode extends TempNode {
54599
54700
 
54600
54701
  // luminosity high pass material
54601
54702
 
54602
- const luminosityHighPass = tslFn( () => {
54703
+ const luminosityHighPass = Fn( () => {
54603
54704
 
54604
54705
  const texel = this.inputNode;
54605
54706
  const v = luminance( texel.rgb );
@@ -54629,7 +54730,7 @@ class BloomNode extends TempNode {
54629
54730
  const bloomFactors = uniformArray( [ 1.0, 0.8, 0.6, 0.4, 0.2 ] );
54630
54731
  const bloomTintColors = uniformArray( [ new Vector3( 1, 1, 1 ), new Vector3( 1, 1, 1 ), new Vector3( 1, 1, 1 ), new Vector3( 1, 1, 1 ), new Vector3( 1, 1, 1 ) ] );
54631
54732
 
54632
- const lerpBloomFactor = tslFn( ( [ factor, radius ] ) => {
54733
+ const lerpBloomFactor = Fn( ( [ factor, radius ] ) => {
54633
54734
 
54634
54735
  const mirrorFactor = float( 1.2 ).sub( factor );
54635
54736
  return mix( factor, mirrorFactor, radius );
@@ -54644,7 +54745,7 @@ class BloomNode extends TempNode {
54644
54745
  } );
54645
54746
 
54646
54747
 
54647
- const compositePass = tslFn( () => {
54748
+ const compositePass = Fn( () => {
54648
54749
 
54649
54750
  const color0 = lerpBloomFactor( bloomFactors.element( 0 ), this.radius ).mul( vec4( bloomTintColors.element( 0 ), 1.0 ) ).mul( this._textureNodeBlur0 );
54650
54751
  const color1 = lerpBloomFactor( bloomFactors.element( 1 ), this.radius ).mul( vec4( bloomTintColors.element( 1 ), 1.0 ) ).mul( this._textureNodeBlur1 );
@@ -54706,12 +54807,12 @@ class BloomNode extends TempNode {
54706
54807
  const uvNode = uv();
54707
54808
  const sampleTexel = ( uv ) => colorTexture.uv( uv );
54708
54809
 
54709
- const seperableBlurPass = tslFn( () => {
54810
+ const seperableBlurPass = Fn( () => {
54710
54811
 
54711
54812
  const weightSum = gaussianCoefficients.element( 0 ).toVar();
54712
54813
  const diffuseSum = sampleTexel( uvNode ).rgb.mul( weightSum ).toVar();
54713
54814
 
54714
- loop( { start: int( 1 ), end: int( kernelRadius ), type: 'int', condition: '<' }, ( { i } ) => {
54815
+ Loop( { start: int( 1 ), end: int( kernelRadius ), type: 'int', condition: '<' }, ( { i } ) => {
54715
54816
 
54716
54817
  const x = float( i );
54717
54818
  const w = gaussianCoefficients.element( i );
@@ -54777,7 +54878,7 @@ class TransitionNode extends TempNode {
54777
54878
 
54778
54879
  };
54779
54880
 
54780
- const transition = tslFn( () => {
54881
+ const transition = Fn( () => {
54781
54882
 
54782
54883
  const texelOne = sampleTexture( textureNodeA );
54783
54884
  const texelTwo = sampleTexture( textureNodeB );
@@ -54792,7 +54893,7 @@ class TransitionNode extends TempNode {
54792
54893
 
54793
54894
  color.assign( mix( texelOne, texelTwo, mixf ) );
54794
54895
 
54795
- } ).else( () => {
54896
+ } ).Else( () => {
54796
54897
 
54797
54898
  color.assign( mix( texelTwo, texelOne, mixRatioNode ) );
54798
54899
 
@@ -54958,7 +55059,7 @@ class PixelationNode extends TempNode {
54958
55059
 
54959
55060
  };
54960
55061
 
54961
- const pixelation = tslFn( () => {
55062
+ const pixelation = Fn( () => {
54962
55063
 
54963
55064
  const texel = sampleTexture();
54964
55065
 
@@ -54988,7 +55089,7 @@ class PixelationNode extends TempNode {
54988
55089
 
54989
55090
  } );
54990
55091
 
54991
- const strength = dei.greaterThan( 0 ).cond( float( 1.0 ).sub( dei.mul( this.depthEdgeStrength ) ), nei.mul( this.normalEdgeStrength ).add( 1 ) );
55092
+ const strength = dei.greaterThan( 0 ).select( float( 1.0 ).sub( dei.mul( this.depthEdgeStrength ) ), nei.mul( this.normalEdgeStrength ).add( 1 ) );
54992
55093
 
54993
55094
  return texel.mul( strength );
54994
55095
 
@@ -55050,7 +55151,7 @@ class PixelationPassNode extends PassNode {
55050
55151
 
55051
55152
  const pixelationPass = ( scene, camera, pixelSize, normalEdgeStrength, depthEdgeStrength ) => nodeObject( new PixelationPassNode( scene, camera, pixelSize, normalEdgeStrength, depthEdgeStrength ) );
55052
55153
 
55053
- const bleach = /*@__PURE__*/ tslFn( ( [ color, opacity = 1 ] ) => {
55154
+ const bleach = /*@__PURE__*/ Fn( ( [ color, opacity = 1 ] ) => {
55054
55155
 
55055
55156
  const base = color;
55056
55157
  const lum = luminance( base.rgb );
@@ -55075,7 +55176,7 @@ const bleach = /*@__PURE__*/ tslFn( ( [ color, opacity = 1 ] ) => {
55075
55176
 
55076
55177
  addNodeElement( 'bleach', bleach );
55077
55178
 
55078
- const sepia = /*@__PURE__*/ tslFn( ( [ color ] ) => {
55179
+ const sepia = /*@__PURE__*/ Fn( ( [ color ] ) => {
55079
55180
 
55080
55181
  const c = vec3( color );
55081
55182
 
@@ -56177,7 +56278,7 @@ const lightTargetDirection = nodeProxy( LightNode, LightNode.TARGET_DIRECTION );
56177
56278
 
56178
56279
  addNodeClass( 'LightNode', LightNode );
56179
56280
 
56180
- const getDistanceAttenuation = tslFn( ( inputs ) => {
56281
+ const getDistanceAttenuation = Fn( ( inputs ) => {
56181
56282
 
56182
56283
  const { lightDistance, cutoffDistance, decayExponent } = inputs;
56183
56284
 
@@ -56186,7 +56287,7 @@ const getDistanceAttenuation = tslFn( ( inputs ) => {
56186
56287
  // https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
56187
56288
  const distanceFalloff = lightDistance.pow( decayExponent ).max( 0.01 ).reciprocal();
56188
56289
 
56189
- return cutoffDistance.greaterThan( 0 ).cond(
56290
+ return cutoffDistance.greaterThan( 0 ).select(
56190
56291
  distanceFalloff.mul( lightDistance.div( cutoffDistance ).pow4().oneMinus().clamp().pow2() ),
56191
56292
  distanceFalloff
56192
56293
  );
@@ -56928,7 +57029,7 @@ class BasicEnvironmentNode extends LightingNode {
56928
57029
 
56929
57030
  addNodeClass( 'BasicEnvironmentNode', BasicEnvironmentNode );
56930
57031
 
56931
- const checkerShaderNode = tslFn( ( inputs ) => {
57032
+ const checkerShaderNode = Fn( ( inputs ) => {
56932
57033
 
56933
57034
  const uv = inputs.uv.mul( 2.0 );
56934
57035
 
@@ -57100,7 +57201,7 @@ class InstancedPointsNodeMaterial extends NodeMaterial {
57100
57201
  const useAlphaToCoverage = this.alphaToCoverage;
57101
57202
  const useColor = this.useColor;
57102
57203
 
57103
- this.vertexNode = tslFn( () => {
57204
+ this.vertexNode = Fn( () => {
57104
57205
 
57105
57206
  //vUv = uv;
57106
57207
  varying( vec2(), 'vUv' ).assign( uv() ); // @TODO: Analyze other way to do this
@@ -57135,7 +57236,7 @@ class InstancedPointsNodeMaterial extends NodeMaterial {
57135
57236
 
57136
57237
  } )();
57137
57238
 
57138
- this.fragmentNode = tslFn( () => {
57239
+ this.fragmentNode = Fn( () => {
57139
57240
 
57140
57241
  const vUv = varying( vec2(), 'vUv' );
57141
57242
 
@@ -57328,7 +57429,7 @@ class Line2NodeMaterial extends NodeMaterial {
57328
57429
  const useDash = this.dashed;
57329
57430
  const useWorldUnits = this.worldUnits;
57330
57431
 
57331
- const trimSegment = tslFn( ( { start, end } ) => {
57432
+ const trimSegment = Fn( ( { start, end } ) => {
57332
57433
 
57333
57434
  const a = cameraProjectionMatrix.element( 2 ).element( 2 ); // 3nd entry in 3th column
57334
57435
  const b = cameraProjectionMatrix.element( 3 ).element( 2 ); // 3nd entry in 4th column
@@ -57340,7 +57441,7 @@ class Line2NodeMaterial extends NodeMaterial {
57340
57441
 
57341
57442
  } );
57342
57443
 
57343
- this.vertexNode = tslFn( () => {
57444
+ this.vertexNode = Fn( () => {
57344
57445
 
57345
57446
  varyingProperty( 'vec2', 'vUv' ).assign( uv() );
57346
57447
 
@@ -57377,7 +57478,7 @@ class Line2NodeMaterial extends NodeMaterial {
57377
57478
 
57378
57479
  end.assign( trimSegment( { start: start, end: end } ) );
57379
57480
 
57380
- } ).elseif( end.z.lessThan( 0.0 ).and( start.z.greaterThanEqual( 0.0 ) ), () => {
57481
+ } ).ElseIf( end.z.lessThan( 0.0 ).and( start.z.greaterThanEqual( 0.0 ) ), () => {
57381
57482
 
57382
57483
  start.assign( trimSegment( { start: end, end: start } ) );
57383
57484
 
@@ -57413,18 +57514,18 @@ class Line2NodeMaterial extends NodeMaterial {
57413
57514
 
57414
57515
  const worldPos = varyingProperty( 'vec4', 'worldPos' );
57415
57516
 
57416
- worldPos.assign( positionGeometry.y.lessThan( 0.5 ).cond( start, end ) );
57517
+ worldPos.assign( positionGeometry.y.lessThan( 0.5 ).select( start, end ) );
57417
57518
 
57418
57519
  // height offset
57419
57520
  const hw = materialLineWidth.mul( 0.5 );
57420
- worldPos.addAssign( vec4( positionGeometry.x.lessThan( 0.0 ).cond( worldUp.mul( hw ), worldUp.mul( hw ).negate() ), 0 ) );
57521
+ worldPos.addAssign( vec4( positionGeometry.x.lessThan( 0.0 ).select( worldUp.mul( hw ), worldUp.mul( hw ).negate() ), 0 ) );
57421
57522
 
57422
57523
  // don't extend the line if we're rendering dashes because we
57423
57524
  // won't be rendering the endcaps
57424
57525
  if ( ! useDash ) {
57425
57526
 
57426
57527
  // cap extension
57427
- worldPos.addAssign( vec4( positionGeometry.y.lessThan( 0.5 ).cond( worldDir.mul( hw ).negate(), worldDir.mul( hw ) ), 0 ) );
57528
+ worldPos.addAssign( vec4( positionGeometry.y.lessThan( 0.5 ).select( worldDir.mul( hw ).negate(), worldDir.mul( hw ) ), 0 ) );
57428
57529
 
57429
57530
  // add width to the box
57430
57531
  worldPos.addAssign( vec4( worldFwd.mul( hw ), 0 ) );
@@ -57445,7 +57546,7 @@ class Line2NodeMaterial extends NodeMaterial {
57445
57546
  // segments overlap neatly
57446
57547
  const clipPose = temp( vec3() );
57447
57548
 
57448
- clipPose.assign( positionGeometry.y.lessThan( 0.5 ).cond( ndcStart, ndcEnd ) );
57549
+ clipPose.assign( positionGeometry.y.lessThan( 0.5 ).select( ndcStart, ndcEnd ) );
57449
57550
  clip.z.assign( clipPose.z.mul( clip.w ) );
57450
57551
 
57451
57552
  } else {
@@ -57459,14 +57560,14 @@ class Line2NodeMaterial extends NodeMaterial {
57459
57560
  offset.x.assign( offset.x.div( aspect ) );
57460
57561
 
57461
57562
  // sign flip
57462
- offset.assign( positionGeometry.x.lessThan( 0.0 ).cond( offset.negate(), offset ) );
57563
+ offset.assign( positionGeometry.x.lessThan( 0.0 ).select( offset.negate(), offset ) );
57463
57564
 
57464
57565
  // endcaps
57465
57566
  If( positionGeometry.y.lessThan( 0.0 ), () => {
57466
57567
 
57467
57568
  offset.assign( offset.sub( dir ) );
57468
57569
 
57469
- } ).elseif( positionGeometry.y.greaterThan( 1.0 ), () => {
57570
+ } ).ElseIf( positionGeometry.y.greaterThan( 1.0 ), () => {
57470
57571
 
57471
57572
  offset.assign( offset.add( dir ) );
57472
57573
 
@@ -57479,7 +57580,7 @@ class Line2NodeMaterial extends NodeMaterial {
57479
57580
  offset.assign( offset.div( viewport.w ) );
57480
57581
 
57481
57582
  // select end
57482
- clip.assign( positionGeometry.y.lessThan( 0.5 ).cond( clipStart, clipEnd ) );
57583
+ clip.assign( positionGeometry.y.lessThan( 0.5 ).select( clipStart, clipEnd ) );
57483
57584
 
57484
57585
  // back to clip space
57485
57586
  offset.assign( offset.mul( clip.w ) );
@@ -57492,7 +57593,7 @@ class Line2NodeMaterial extends NodeMaterial {
57492
57593
 
57493
57594
  } )();
57494
57595
 
57495
- const closestLineToLine = tslFn( ( { p1, p2, p3, p4 } ) => {
57596
+ const closestLineToLine = Fn( ( { p1, p2, p3, p4 } ) => {
57496
57597
 
57497
57598
  const p13 = p1.sub( p3 );
57498
57599
  const p43 = p4.sub( p3 );
@@ -57515,7 +57616,7 @@ class Line2NodeMaterial extends NodeMaterial {
57515
57616
 
57516
57617
  } );
57517
57618
 
57518
- this.fragmentNode = tslFn( () => {
57619
+ this.fragmentNode = Fn( () => {
57519
57620
 
57520
57621
  const vUv = varyingProperty( 'vec2', 'vUv' );
57521
57622
 
@@ -57532,7 +57633,7 @@ class Line2NodeMaterial extends NodeMaterial {
57532
57633
  const instanceDistanceStart = attribute( 'instanceDistanceStart' );
57533
57634
  const instanceDistanceEnd = attribute( 'instanceDistanceEnd' );
57534
57635
 
57535
- const lineDistance = positionGeometry.y.lessThan( 0.5 ).cond( dashScaleNode.mul( instanceDistanceStart ), materialLineScale.mul( instanceDistanceEnd ) );
57636
+ const lineDistance = positionGeometry.y.lessThan( 0.5 ).select( dashScaleNode.mul( instanceDistanceStart ), materialLineScale.mul( instanceDistanceEnd ) );
57536
57637
 
57537
57638
  const vLineDistance = varying( lineDistance.add( materialLineDashOffset ) );
57538
57639
  const vLineDistanceOffset = offsetNode ? vLineDistance.add( offsetNode ) : vLineDistance;
@@ -57584,7 +57685,7 @@ class Line2NodeMaterial extends NodeMaterial {
57584
57685
  if ( useAlphaToCoverage ) {
57585
57686
 
57586
57687
  const a = vUv.x;
57587
- const b = vUv.y.greaterThan( 0.0 ).cond( vUv.y.sub( 1.0 ), vUv.y.add( 1.0 ) );
57688
+ const b = vUv.y.greaterThan( 0.0 ).select( vUv.y.sub( 1.0 ), vUv.y.add( 1.0 ) );
57588
57689
 
57589
57690
  const len2 = a.mul( a ).add( b.mul( b ) );
57590
57691
 
@@ -57603,7 +57704,7 @@ class Line2NodeMaterial extends NodeMaterial {
57603
57704
  If( vUv.y.abs().greaterThan( 1.0 ), () => {
57604
57705
 
57605
57706
  const a = vUv.x;
57606
- const b = vUv.y.greaterThan( 0.0 ).cond( vUv.y.sub( 1.0 ), vUv.y.add( 1.0 ) );
57707
+ const b = vUv.y.greaterThan( 0.0 ).select( vUv.y.sub( 1.0 ), vUv.y.add( 1.0 ) );
57607
57708
  const len2 = a.mul( a ).add( b.mul( b ) );
57608
57709
 
57609
57710
  len2.greaterThan( 1.0 ).discard();
@@ -57627,7 +57728,7 @@ class Line2NodeMaterial extends NodeMaterial {
57627
57728
  const instanceColorStart = attribute( 'instanceColorStart' );
57628
57729
  const instanceColorEnd = attribute( 'instanceColorEnd' );
57629
57730
 
57630
- const instanceColor = positionGeometry.y.lessThan( 0.5 ).cond( instanceColorStart, instanceColorEnd );
57731
+ const instanceColor = positionGeometry.y.lessThan( 0.5 ).select( instanceColorStart, instanceColorEnd );
57631
57732
 
57632
57733
  lineColorNode = instanceColor.mul( materialColor );
57633
57734
 
@@ -57890,7 +57991,7 @@ class MeshBasicNodeMaterial extends NodeMaterial {
57890
57991
 
57891
57992
  addNodeMaterial( 'MeshBasicNodeMaterial', MeshBasicNodeMaterial );
57892
57993
 
57893
- const F_Schlick = tslFn( ( { f0, f90, dotVH } ) => {
57994
+ const F_Schlick = Fn( ( { f0, f90, dotVH } ) => {
57894
57995
 
57895
57996
  // Original approximation by Christophe Schlick '94
57896
57997
  // float fresnel = pow( 1.0 - dotVH, 5.0 );
@@ -57903,7 +58004,7 @@ const F_Schlick = tslFn( ( { f0, f90, dotVH } ) => {
57903
58004
 
57904
58005
  } ); // validated
57905
58006
 
57906
- const BRDF_Lambert = tslFn( ( inputs ) => {
58007
+ const BRDF_Lambert = Fn( ( inputs ) => {
57907
58008
 
57908
58009
  return inputs.diffuseColor.mul( 1 / Math.PI ); // punctual light
57909
58010
 
@@ -57911,13 +58012,13 @@ const BRDF_Lambert = tslFn( ( inputs ) => {
57911
58012
 
57912
58013
  const G_BlinnPhong_Implicit = () => float( 0.25 );
57913
58014
 
57914
- const D_BlinnPhong = tslFn( ( { dotNH } ) => {
58015
+ const D_BlinnPhong = Fn( ( { dotNH } ) => {
57915
58016
 
57916
58017
  return shininess.mul( float( 0.5 ) ).add( 1.0 ).mul( float( 1 / Math.PI ) ).mul( dotNH.pow( shininess ) );
57917
58018
 
57918
58019
  } );
57919
58020
 
57920
- const BRDF_BlinnPhong = tslFn( ( { lightDirection } ) => {
58021
+ const BRDF_BlinnPhong = Fn( ( { lightDirection } ) => {
57921
58022
 
57922
58023
  const halfDir = lightDirection.add( positionViewDirection ).normalize();
57923
58024
 
@@ -58067,7 +58168,7 @@ class MeshPhongNodeMaterial extends NodeMaterial {
58067
58168
 
58068
58169
  addNodeMaterial( 'MeshPhongNodeMaterial', MeshPhongNodeMaterial );
58069
58170
 
58070
- const getGeometryRoughness = tslFn( () => {
58171
+ const getGeometryRoughness = Fn( () => {
58071
58172
 
58072
58173
  const dxy = normalGeometry.dFdx().abs().max( normalGeometry.dFdy().abs() );
58073
58174
  const geometryRoughness = dxy.x.max( dxy.y ).max( dxy.z );
@@ -58076,7 +58177,7 @@ const getGeometryRoughness = tslFn( () => {
58076
58177
 
58077
58178
  } );
58078
58179
 
58079
- const getRoughness = tslFn( ( inputs ) => {
58180
+ const getRoughness = Fn( ( inputs ) => {
58080
58181
 
58081
58182
  const { roughness } = inputs;
58082
58183
 
@@ -58092,7 +58193,7 @@ const getRoughness = tslFn( ( inputs ) => {
58092
58193
 
58093
58194
  // Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2
58094
58195
  // https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
58095
- const V_GGX_SmithCorrelated = tslFn( ( { alpha, dotNL, dotNV } ) => {
58196
+ const V_GGX_SmithCorrelated = Fn( ( { alpha, dotNL, dotNV } ) => {
58096
58197
 
58097
58198
  const a2 = alpha.pow2();
58098
58199
 
@@ -58113,7 +58214,7 @@ const V_GGX_SmithCorrelated = tslFn( ( { alpha, dotNL, dotNV } ) => {
58113
58214
 
58114
58215
  // https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf
58115
58216
 
58116
- const V_GGX_SmithCorrelated_Anisotropic = tslFn( ( { alphaT, alphaB, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL } ) => {
58217
+ const V_GGX_SmithCorrelated_Anisotropic = Fn( ( { alphaT, alphaB, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL } ) => {
58117
58218
 
58118
58219
  const gv = dotNL.mul( vec3( alphaT.mul( dotTV ), alphaB.mul( dotBV ), dotNV ).length() );
58119
58220
  const gl = dotNV.mul( vec3( alphaT.mul( dotTL ), alphaB.mul( dotBL ), dotNL ).length() );
@@ -58139,7 +58240,7 @@ const V_GGX_SmithCorrelated_Anisotropic = tslFn( ( { alphaT, alphaB, dotTV, dotB
58139
58240
  // Microfacet Models for Refraction through Rough Surfaces - equation (33)
58140
58241
  // http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
58141
58242
  // alpha is "roughness squared" in Disney’s reparameterization
58142
- const D_GGX = tslFn( ( { alpha, dotNH } ) => {
58243
+ const D_GGX = Fn( ( { alpha, dotNH } ) => {
58143
58244
 
58144
58245
  const a2 = alpha.pow2();
58145
58246
 
@@ -58160,7 +58261,7 @@ const RECIPROCAL_PI = float( 1 / Math.PI );
58160
58261
 
58161
58262
  // https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf
58162
58263
 
58163
- const D_GGX_Anisotropic = tslFn( ( { alphaT, alphaB, dotNH, dotTH, dotBH } ) => {
58264
+ const D_GGX_Anisotropic = Fn( ( { alphaT, alphaB, dotNH, dotTH, dotBH } ) => {
58164
58265
 
58165
58266
  const a2 = alphaT.mul( alphaB );
58166
58267
  const v = vec3( alphaB.mul( dotTH ), alphaT.mul( dotBH ), a2.mul( dotNH ) );
@@ -58182,7 +58283,7 @@ const D_GGX_Anisotropic = tslFn( ( { alphaT, alphaB, dotNH, dotTH, dotBH } ) =>
58182
58283
  } );
58183
58284
 
58184
58285
  // GGX Distribution, Schlick Fresnel, GGX_SmithCorrelated Visibility
58185
- const BRDF_GGX = tslFn( ( inputs ) => {
58286
+ const BRDF_GGX = Fn( ( inputs ) => {
58186
58287
 
58187
58288
  const { lightDirection, f0, f90, roughness, f, USE_IRIDESCENCE, USE_ANISOTROPY } = inputs;
58188
58289
 
@@ -58233,7 +58334,7 @@ const BRDF_GGX = tslFn( ( inputs ) => {
58233
58334
  // split-sum approximation used in indirect specular lighting.
58234
58335
  // via 'environmentBRDF' from "Physically Based Shading on Mobile"
58235
58336
  // https://www.unrealengine.com/blog/physically-based-shading-on-mobile
58236
- const DFGApprox = tslFn( ( { roughness, dotNV } ) => {
58337
+ const DFGApprox = Fn( ( { roughness, dotNV } ) => {
58237
58338
 
58238
58339
  const c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
58239
58340
 
@@ -58256,7 +58357,7 @@ const DFGApprox = tslFn( ( { roughness, dotNV } ) => {
58256
58357
  ]
58257
58358
  } );
58258
58359
 
58259
- const EnvironmentBRDF = tslFn( ( inputs ) => {
58360
+ const EnvironmentBRDF = Fn( ( inputs ) => {
58260
58361
 
58261
58362
  const { dotNV, specularColor, specularF90, roughness } = inputs;
58262
58363
 
@@ -58265,7 +58366,7 @@ const EnvironmentBRDF = tslFn( ( inputs ) => {
58265
58366
 
58266
58367
  } );
58267
58368
 
58268
- const Schlick_to_F0 = tslFn( ( { f, f90, dotVH } ) => {
58369
+ const Schlick_to_F0 = Fn( ( { f, f90, dotVH } ) => {
58269
58370
 
58270
58371
  const x = dotVH.oneMinus().saturate();
58271
58372
  const x2 = x.mul( x );
@@ -58284,7 +58385,7 @@ const Schlick_to_F0 = tslFn( ( { f, f90, dotVH } ) => {
58284
58385
  } );
58285
58386
 
58286
58387
  // https://github.com/google/filament/blob/master/shaders/src/brdf.fs
58287
- const D_Charlie = tslFn( ( { roughness, dotNH } ) => {
58388
+ const D_Charlie = Fn( ( { roughness, dotNH } ) => {
58288
58389
 
58289
58390
  const alpha = roughness.pow2();
58290
58391
 
@@ -58305,7 +58406,7 @@ const D_Charlie = tslFn( ( { roughness, dotNH } ) => {
58305
58406
  } );
58306
58407
 
58307
58408
  // https://github.com/google/filament/blob/master/shaders/src/brdf.fs
58308
- const V_Neubelt = tslFn( ( { dotNV, dotNL } ) => {
58409
+ const V_Neubelt = Fn( ( { dotNV, dotNL } ) => {
58309
58410
 
58310
58411
  // Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886"
58311
58412
  return float( 1.0 ).div( float( 4.0 ).mul( dotNL.add( dotNV ).sub( dotNL.mul( dotNV ) ) ) );
@@ -58319,7 +58420,7 @@ const V_Neubelt = tslFn( ( { dotNV, dotNL } ) => {
58319
58420
  ]
58320
58421
  } );
58321
58422
 
58322
- const BRDF_Sheen = tslFn( ( { lightDirection } ) => {
58423
+ const BRDF_Sheen = Fn( ( { lightDirection } ) => {
58323
58424
 
58324
58425
  const halfDir = lightDirection.add( positionViewDirection ).normalize();
58325
58426
 
@@ -58340,7 +58441,7 @@ const BRDF_Sheen = tslFn( ( { lightDirection } ) => {
58340
58441
  // by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt
58341
58442
  // code: https://github.com/selfshadow/ltc_code/
58342
58443
 
58343
- const LTC_Uv = tslFn( ( { N, V, roughness } ) => {
58444
+ const LTC_Uv = Fn( ( { N, V, roughness } ) => {
58344
58445
 
58345
58446
  const LUT_SIZE = 64.0;
58346
58447
  const LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
@@ -58365,7 +58466,7 @@ const LTC_Uv = tslFn( ( { N, V, roughness } ) => {
58365
58466
  ]
58366
58467
  } );
58367
58468
 
58368
- const LTC_ClippedSphereFormFactor = tslFn( ( { f } ) => {
58469
+ const LTC_ClippedSphereFormFactor = Fn( ( { f } ) => {
58369
58470
 
58370
58471
  // Real-Time Area Lighting: a Journey from Research to Production (p.102)
58371
58472
  // An approximation of the form factor of a horizon-clipped rectangle.
@@ -58382,7 +58483,7 @@ const LTC_ClippedSphereFormFactor = tslFn( ( { f } ) => {
58382
58483
  ]
58383
58484
  } );
58384
58485
 
58385
- const LTC_EdgeVectorFormFactor = tslFn( ( { v1, v2 } ) => {
58486
+ const LTC_EdgeVectorFormFactor = Fn( ( { v1, v2 } ) => {
58386
58487
 
58387
58488
  const x = v1.dot( v2 );
58388
58489
  const y = x.abs().toVar();
@@ -58392,7 +58493,7 @@ const LTC_EdgeVectorFormFactor = tslFn( ( { v1, v2 } ) => {
58392
58493
  const b = y.add( 4.1616724 ).mul( y ).add( 3.4175940 ).toVar();
58393
58494
  const v = a.div( b );
58394
58495
 
58395
- const theta_sintheta = x.greaterThan( 0.0 ).cond( v, max$1( x.mul( x ).oneMinus(), 1e-7 ).inverseSqrt().mul( 0.5 ).sub( v ) );
58496
+ const theta_sintheta = x.greaterThan( 0.0 ).select( v, max$1( x.mul( x ).oneMinus(), 1e-7 ).inverseSqrt().mul( 0.5 ).sub( v ) );
58396
58497
 
58397
58498
  return v1.cross( v2 ).mul( theta_sintheta );
58398
58499
 
@@ -58405,7 +58506,7 @@ const LTC_EdgeVectorFormFactor = tslFn( ( { v1, v2 } ) => {
58405
58506
  ]
58406
58507
  } );
58407
58508
 
58408
- const LTC_Evaluate = tslFn( ( { N, V, P, mInv, p0, p1, p2, p3 } ) => {
58509
+ const LTC_Evaluate = Fn( ( { N, V, P, mInv, p0, p1, p2, p3 } ) => {
58409
58510
 
58410
58511
  // bail if point is on back side of plane of light
58411
58512
  // assumes ccw winding order of light vertices
@@ -58464,7 +58565,7 @@ const LTC_Evaluate = tslFn( ( { N, V, P, mInv, p0, p1, p2, p3 } ) => {
58464
58565
  // Transmission
58465
58566
  //
58466
58567
 
58467
- const getVolumeTransmissionRay = tslFn( ( [ n, v, thickness, ior, modelMatrix ] ) => {
58568
+ const getVolumeTransmissionRay = Fn( ( [ n, v, thickness, ior, modelMatrix ] ) => {
58468
58569
 
58469
58570
  // Direction of refracted light.
58470
58571
  const refractionVector = vec3( refract( v.negate(), normalize( n ), div( 1.0, ior ) ) );
@@ -58491,7 +58592,7 @@ const getVolumeTransmissionRay = tslFn( ( [ n, v, thickness, ior, modelMatrix ]
58491
58592
  ]
58492
58593
  } );
58493
58594
 
58494
- const applyIorToRoughness = tslFn( ( [ roughness, ior ] ) => {
58595
+ const applyIorToRoughness = Fn( ( [ roughness, ior ] ) => {
58495
58596
 
58496
58597
  // Scale roughness with IOR so that an IOR of 1.0 results in no microfacet refraction and
58497
58598
  // an IOR of 1.5 results in the default amount of microfacet refraction.
@@ -58508,7 +58609,7 @@ const applyIorToRoughness = tslFn( ( [ roughness, ior ] ) => {
58508
58609
 
58509
58610
  const singleViewportMipTexture = viewportMipTexture();
58510
58611
 
58511
- const getTransmissionSample = tslFn( ( [ fragCoord, roughness, ior ] ) => {
58612
+ const getTransmissionSample = Fn( ( [ fragCoord, roughness, ior ] ) => {
58512
58613
 
58513
58614
  const transmissionSample = singleViewportMipTexture.uv( fragCoord );
58514
58615
  //const transmissionSample = viewportMipTexture( fragCoord );
@@ -58519,7 +58620,7 @@ const getTransmissionSample = tslFn( ( [ fragCoord, roughness, ior ] ) => {
58519
58620
 
58520
58621
  } );
58521
58622
 
58522
- const volumeAttenuation = tslFn( ( [ transmissionDistance, attenuationColor, attenuationDistance ] ) => {
58623
+ const volumeAttenuation = Fn( ( [ transmissionDistance, attenuationColor, attenuationDistance ] ) => {
58523
58624
 
58524
58625
  If( attenuationDistance.notEqual( 0 ), () => {
58525
58626
 
@@ -58544,7 +58645,7 @@ const volumeAttenuation = tslFn( ( [ transmissionDistance, attenuationColor, att
58544
58645
  ]
58545
58646
  } );
58546
58647
 
58547
- const getIBLVolumeRefraction = tslFn( ( [ n, v, roughness, diffuseColor, specularColor, specularF90, position, modelMatrix, viewMatrix, projMatrix, ior, thickness, attenuationColor, attenuationDistance, dispersion ] ) => {
58648
+ const getIBLVolumeRefraction = Fn( ( [ n, v, roughness, diffuseColor, specularColor, specularF90, position, modelMatrix, viewMatrix, projMatrix, ior, thickness, attenuationColor, attenuationDistance, dispersion ] ) => {
58548
58649
 
58549
58650
  let transmittedLight, transmittance;
58550
58651
 
@@ -58556,7 +58657,7 @@ const getIBLVolumeRefraction = tslFn( ( [ n, v, roughness, diffuseColor, specula
58556
58657
  const halfSpread = ior.sub( 1.0 ).mul( dispersion.mul( 0.025 ) );
58557
58658
  const iors = vec3( ior.sub( halfSpread ), ior, ior.add( halfSpread ) );
58558
58659
 
58559
- loop( { start: 0, end: 3 }, ( { i } ) => {
58660
+ Loop( { start: 0, end: 3 }, ( { i } ) => {
58560
58661
 
58561
58662
  const ior = iors.element( i );
58562
58663
 
@@ -58667,7 +58768,7 @@ const evalSensitivity = ( OPD, shift ) => {
58667
58768
 
58668
58769
  };
58669
58770
 
58670
- const evalIridescence = tslFn( ( { outsideIOR, eta2, cosTheta1, thinFilmThickness, baseF0 } ) => {
58771
+ const evalIridescence = Fn( ( { outsideIOR, eta2, cosTheta1, thinFilmThickness, baseF0 } ) => {
58671
58772
 
58672
58773
  // Force iridescenceIOR -> outsideIOR when thinFilmThickness -> 0.0
58673
58774
  const iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
@@ -58689,7 +58790,7 @@ const evalIridescence = tslFn( ( { outsideIOR, eta2, cosTheta1, thinFilmThicknes
58689
58790
  const R12 = F_Schlick( { f0: R0, f90: 1.0, dotVH: cosTheta1 } );
58690
58791
  //const R21 = R12;
58691
58792
  const T121 = R12.oneMinus();
58692
- const phi12 = iridescenceIOR.lessThan( outsideIOR ).cond( Math.PI, 0.0 );
58793
+ const phi12 = iridescenceIOR.lessThan( outsideIOR ).select( Math.PI, 0.0 );
58693
58794
  const phi21 = float( Math.PI ).sub( phi12 );
58694
58795
 
58695
58796
  // Second interface
@@ -58697,9 +58798,9 @@ const evalIridescence = tslFn( ( { outsideIOR, eta2, cosTheta1, thinFilmThicknes
58697
58798
  const R1 = IorToFresnel0( baseIOR, iridescenceIOR.toVec3() );
58698
58799
  const R23 = F_Schlick( { f0: R1, f90: 1.0, dotVH: cosTheta2 } );
58699
58800
  const phi23 = vec3(
58700
- baseIOR.x.lessThan( iridescenceIOR ).cond( Math.PI, 0.0 ),
58701
- baseIOR.y.lessThan( iridescenceIOR ).cond( Math.PI, 0.0 ),
58702
- baseIOR.z.lessThan( iridescenceIOR ).cond( Math.PI, 0.0 )
58801
+ baseIOR.x.lessThan( iridescenceIOR ).select( Math.PI, 0.0 ),
58802
+ baseIOR.y.lessThan( iridescenceIOR ).select( Math.PI, 0.0 ),
58803
+ baseIOR.z.lessThan( iridescenceIOR ).select( Math.PI, 0.0 )
58703
58804
  );
58704
58805
 
58705
58806
  // Phase shift
@@ -58747,25 +58848,25 @@ const evalIridescence = tslFn( ( { outsideIOR, eta2, cosTheta1, thinFilmThicknes
58747
58848
  // This is a curve-fit approxmation to the "Charlie sheen" BRDF integrated over the hemisphere from
58748
58849
  // Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF". The analysis can be found
58749
58850
  // in the Sheen section of https://drive.google.com/file/d/1T0D1VSyR4AllqIJTQAraEIzjlb5h4FKH/view?usp=sharing
58750
- const IBLSheenBRDF = tslFn( ( { normal, viewDir, roughness } ) => {
58851
+ const IBLSheenBRDF = Fn( ( { normal, viewDir, roughness } ) => {
58751
58852
 
58752
58853
  const dotNV = normal.dot( viewDir ).saturate();
58753
58854
 
58754
58855
  const r2 = roughness.pow2();
58755
58856
 
58756
- const a = cond(
58857
+ const a = select(
58757
58858
  roughness.lessThan( 0.25 ),
58758
58859
  float( - 339.2 ).mul( r2 ).add( float( 161.4 ).mul( roughness ) ).sub( 25.9 ),
58759
58860
  float( - 8.48 ).mul( r2 ).add( float( 14.3 ).mul( roughness ) ).sub( 9.95 )
58760
58861
  );
58761
58862
 
58762
- const b = cond(
58863
+ const b = select(
58763
58864
  roughness.lessThan( 0.25 ),
58764
58865
  float( 44.0 ).mul( r2 ).sub( float( 23.7 ).mul( roughness ) ).add( 3.26 ),
58765
58866
  float( 1.97 ).mul( r2 ).sub( float( 3.27 ).mul( roughness ) ).add( 0.72 )
58766
58867
  );
58767
58868
 
58768
- const DG = cond( roughness.lessThan( 0.25 ), 0.0, float( 0.1 ).mul( roughness ).sub( 0.025 ) ).add( a.mul( dotNV ).add( b ).exp() );
58869
+ const DG = select( roughness.lessThan( 0.25 ), 0.0, float( 0.1 ).mul( roughness ).sub( 0.025 ) ).add( a.mul( dotNV ).add( b ).exp() );
58769
58870
 
58770
58871
  return DG.mul( 1.0 / Math.PI ).saturate();
58771
58872
 
@@ -59306,7 +59407,7 @@ class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
59306
59407
 
59307
59408
  anisotropyV.assign( vec2( 1.0, 0.0 ) );
59308
59409
 
59309
- } ).else( () => {
59410
+ } ).Else( () => {
59310
59411
 
59311
59412
  anisotropyV.divAssign( vec2( anisotropy ) );
59312
59413
  anisotropy.assign( anisotropy.saturate() );
@@ -59467,7 +59568,7 @@ class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial {
59467
59568
 
59468
59569
  addNodeMaterial( 'MeshSSSNodeMaterial', MeshSSSNodeMaterial );
59469
59570
 
59470
- const getGradientIrradiance = tslFn( ( { normal, lightDirection, builder } ) => {
59571
+ const getGradientIrradiance = Fn( ( { normal, lightDirection, builder } ) => {
59471
59572
 
59472
59573
  // dotNL will be from -1.0 to 1.0
59473
59574
  const dotNL = normal.dot( lightDirection );
@@ -59765,7 +59866,7 @@ class VolumeNodeMaterial extends NodeMaterial {
59765
59866
 
59766
59867
  const map = texture3D( this.map, null, 0 );
59767
59868
 
59768
- const hitBox = tslFn( ( { orig, dir } ) => {
59869
+ const hitBox = Fn( ( { orig, dir } ) => {
59769
59870
 
59770
59871
  const box_min = vec3( - 0.5 );
59771
59872
  const box_max = vec3( 0.5 );
@@ -59785,7 +59886,7 @@ class VolumeNodeMaterial extends NodeMaterial {
59785
59886
 
59786
59887
  } );
59787
59888
 
59788
- this.fragmentNode = tslFn( () => {
59889
+ this.fragmentNode = Fn( () => {
59789
59890
 
59790
59891
  const vOrigin = varying( vec3( modelWorldMatrixInverse.mul( vec4( cameraPosition, 1.0 ) ) ) );
59791
59892
  const vDirection = varying( positionGeometry.sub( vOrigin ) );
@@ -59805,7 +59906,7 @@ class VolumeNodeMaterial extends NodeMaterial {
59805
59906
 
59806
59907
  const ac = property( 'vec4', 'ac' ).assign( vec4( materialReference( 'base', 'color' ), 0.0 ) );
59807
59908
 
59808
- loop( { type: 'float', start: bounds.x, end: bounds.y, update: '+= delta' }, () => {
59909
+ Loop( { type: 'float', start: bounds.x, end: bounds.y, update: '+= delta' }, () => {
59809
59910
 
59810
59911
  const d = property( 'float', 'd' ).assign( map.uv( p.add( 0.5 ) ).r );
59811
59912
 
@@ -60153,13 +60254,13 @@ class GLSLNodeParser extends NodeParser {
60153
60254
 
60154
60255
 
60155
60256
 
60156
- const mx_select = /*#__PURE__*/ tslFn( ( [ b_immutable, t_immutable, f_immutable ] ) => {
60257
+ const mx_select = /*#__PURE__*/ Fn( ( [ b_immutable, t_immutable, f_immutable ] ) => {
60157
60258
 
60158
60259
  const f = float( f_immutable ).toVar();
60159
60260
  const t = float( t_immutable ).toVar();
60160
60261
  const b = bool( b_immutable ).toVar();
60161
60262
 
60162
- return cond( b, t, f );
60263
+ return select( b, t, f );
60163
60264
 
60164
60265
  } ).setLayout( {
60165
60266
  name: 'mx_select',
@@ -60171,12 +60272,12 @@ const mx_select = /*#__PURE__*/ tslFn( ( [ b_immutable, t_immutable, f_immutable
60171
60272
  ]
60172
60273
  } );
60173
60274
 
60174
- const mx_negate_if = /*#__PURE__*/ tslFn( ( [ val_immutable, b_immutable ] ) => {
60275
+ const mx_negate_if = /*#__PURE__*/ Fn( ( [ val_immutable, b_immutable ] ) => {
60175
60276
 
60176
60277
  const b = bool( b_immutable ).toVar();
60177
60278
  const val = float( val_immutable ).toVar();
60178
60279
 
60179
- return cond( b, val.negate(), val );
60280
+ return select( b, val.negate(), val );
60180
60281
 
60181
60282
  } ).setLayout( {
60182
60283
  name: 'mx_negate_if',
@@ -60187,7 +60288,7 @@ const mx_negate_if = /*#__PURE__*/ tslFn( ( [ val_immutable, b_immutable ] ) =>
60187
60288
  ]
60188
60289
  } );
60189
60290
 
60190
- const mx_floor = /*#__PURE__*/ tslFn( ( [ x_immutable ] ) => {
60291
+ const mx_floor = /*#__PURE__*/ Fn( ( [ x_immutable ] ) => {
60191
60292
 
60192
60293
  const x = float( x_immutable ).toVar();
60193
60294
 
@@ -60201,7 +60302,7 @@ const mx_floor = /*#__PURE__*/ tslFn( ( [ x_immutable ] ) => {
60201
60302
  ]
60202
60303
  } );
60203
60304
 
60204
- const mx_floorfrac = /*#__PURE__*/ tslFn( ( [ x_immutable, i ] ) => {
60305
+ const mx_floorfrac = /*#__PURE__*/ Fn( ( [ x_immutable, i ] ) => {
60205
60306
 
60206
60307
  const x = float( x_immutable ).toVar();
60207
60308
  i.assign( mx_floor( x ) );
@@ -60210,7 +60311,7 @@ const mx_floorfrac = /*#__PURE__*/ tslFn( ( [ x_immutable, i ] ) => {
60210
60311
 
60211
60312
  } );
60212
60313
 
60213
- const mx_bilerp_0 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, s_immutable, t_immutable ] ) => {
60314
+ const mx_bilerp_0 = /*#__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, s_immutable, t_immutable ] ) => {
60214
60315
 
60215
60316
  const t = float( t_immutable ).toVar();
60216
60317
  const s = float( s_immutable ).toVar();
@@ -60235,7 +60336,7 @@ const mx_bilerp_0 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_immu
60235
60336
  ]
60236
60337
  } );
60237
60338
 
60238
- const mx_bilerp_1 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, s_immutable, t_immutable ] ) => {
60339
+ const mx_bilerp_1 = /*#__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, s_immutable, t_immutable ] ) => {
60239
60340
 
60240
60341
  const t = float( t_immutable ).toVar();
60241
60342
  const s = float( s_immutable ).toVar();
@@ -60262,7 +60363,7 @@ const mx_bilerp_1 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_immu
60262
60363
 
60263
60364
  const mx_bilerp = /*#__PURE__*/ overloadingFn( [ mx_bilerp_0, mx_bilerp_1 ] );
60264
60365
 
60265
- const mx_trilerp_0 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, v4_immutable, v5_immutable, v6_immutable, v7_immutable, s_immutable, t_immutable, r_immutable ] ) => {
60366
+ const mx_trilerp_0 = /*#__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, v4_immutable, v5_immutable, v6_immutable, v7_immutable, s_immutable, t_immutable, r_immutable ] ) => {
60266
60367
 
60267
60368
  const r = float( r_immutable ).toVar();
60268
60369
  const t = float( t_immutable ).toVar();
@@ -60299,7 +60400,7 @@ const mx_trilerp_0 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_imm
60299
60400
  ]
60300
60401
  } );
60301
60402
 
60302
- const mx_trilerp_1 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, v4_immutable, v5_immutable, v6_immutable, v7_immutable, s_immutable, t_immutable, r_immutable ] ) => {
60403
+ const mx_trilerp_1 = /*#__PURE__*/ Fn( ( [ v0_immutable, v1_immutable, v2_immutable, v3_immutable, v4_immutable, v5_immutable, v6_immutable, v7_immutable, s_immutable, t_immutable, r_immutable ] ) => {
60303
60404
 
60304
60405
  const r = float( r_immutable ).toVar();
60305
60406
  const t = float( t_immutable ).toVar();
@@ -60338,7 +60439,7 @@ const mx_trilerp_1 = /*#__PURE__*/ tslFn( ( [ v0_immutable, v1_immutable, v2_imm
60338
60439
 
60339
60440
  const mx_trilerp = /*#__PURE__*/ overloadingFn( [ mx_trilerp_0, mx_trilerp_1 ] );
60340
60441
 
60341
- const mx_gradient_float_0 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable, y_immutable ] ) => {
60442
+ const mx_gradient_float_0 = /*#__PURE__*/ Fn( ( [ hash_immutable, x_immutable, y_immutable ] ) => {
60342
60443
 
60343
60444
  const y = float( y_immutable ).toVar();
60344
60445
  const x = float( x_immutable ).toVar();
@@ -60359,7 +60460,7 @@ const mx_gradient_float_0 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable
60359
60460
  ]
60360
60461
  } );
60361
60462
 
60362
- const mx_gradient_float_1 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable, y_immutable, z_immutable ] ) => {
60463
+ const mx_gradient_float_1 = /*#__PURE__*/ Fn( ( [ hash_immutable, x_immutable, y_immutable, z_immutable ] ) => {
60363
60464
 
60364
60465
  const z = float( z_immutable ).toVar();
60365
60466
  const y = float( y_immutable ).toVar();
@@ -60384,7 +60485,7 @@ const mx_gradient_float_1 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable
60384
60485
 
60385
60486
  const mx_gradient_float = /*#__PURE__*/ overloadingFn( [ mx_gradient_float_0, mx_gradient_float_1 ] );
60386
60487
 
60387
- const mx_gradient_vec3_0 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable, y_immutable ] ) => {
60488
+ const mx_gradient_vec3_0 = /*#__PURE__*/ Fn( ( [ hash_immutable, x_immutable, y_immutable ] ) => {
60388
60489
 
60389
60490
  const y = float( y_immutable ).toVar();
60390
60491
  const x = float( x_immutable ).toVar();
@@ -60402,7 +60503,7 @@ const mx_gradient_vec3_0 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable,
60402
60503
  ]
60403
60504
  } );
60404
60505
 
60405
- const mx_gradient_vec3_1 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable, y_immutable, z_immutable ] ) => {
60506
+ const mx_gradient_vec3_1 = /*#__PURE__*/ Fn( ( [ hash_immutable, x_immutable, y_immutable, z_immutable ] ) => {
60406
60507
 
60407
60508
  const z = float( z_immutable ).toVar();
60408
60509
  const y = float( y_immutable ).toVar();
@@ -60424,7 +60525,7 @@ const mx_gradient_vec3_1 = /*#__PURE__*/ tslFn( ( [ hash_immutable, x_immutable,
60424
60525
 
60425
60526
  const mx_gradient_vec3 = /*#__PURE__*/ overloadingFn( [ mx_gradient_vec3_0, mx_gradient_vec3_1 ] );
60426
60527
 
60427
- const mx_gradient_scale2d_0 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60528
+ const mx_gradient_scale2d_0 = /*#__PURE__*/ Fn( ( [ v_immutable ] ) => {
60428
60529
 
60429
60530
  const v = float( v_immutable ).toVar();
60430
60531
 
@@ -60438,7 +60539,7 @@ const mx_gradient_scale2d_0 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60438
60539
  ]
60439
60540
  } );
60440
60541
 
60441
- const mx_gradient_scale3d_0 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60542
+ const mx_gradient_scale3d_0 = /*#__PURE__*/ Fn( ( [ v_immutable ] ) => {
60442
60543
 
60443
60544
  const v = float( v_immutable ).toVar();
60444
60545
 
@@ -60452,7 +60553,7 @@ const mx_gradient_scale3d_0 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60452
60553
  ]
60453
60554
  } );
60454
60555
 
60455
- const mx_gradient_scale2d_1 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60556
+ const mx_gradient_scale2d_1 = /*#__PURE__*/ Fn( ( [ v_immutable ] ) => {
60456
60557
 
60457
60558
  const v = vec3( v_immutable ).toVar();
60458
60559
 
@@ -60468,7 +60569,7 @@ const mx_gradient_scale2d_1 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60468
60569
 
60469
60570
  const mx_gradient_scale2d = /*#__PURE__*/ overloadingFn( [ mx_gradient_scale2d_0, mx_gradient_scale2d_1 ] );
60470
60571
 
60471
- const mx_gradient_scale3d_1 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60572
+ const mx_gradient_scale3d_1 = /*#__PURE__*/ Fn( ( [ v_immutable ] ) => {
60472
60573
 
60473
60574
  const v = vec3( v_immutable ).toVar();
60474
60575
 
@@ -60484,7 +60585,7 @@ const mx_gradient_scale3d_1 = /*#__PURE__*/ tslFn( ( [ v_immutable ] ) => {
60484
60585
 
60485
60586
  const mx_gradient_scale3d = /*#__PURE__*/ overloadingFn( [ mx_gradient_scale3d_0, mx_gradient_scale3d_1 ] );
60486
60587
 
60487
- const mx_rotl32 = /*#__PURE__*/ tslFn( ( [ x_immutable, k_immutable ] ) => {
60588
+ const mx_rotl32 = /*#__PURE__*/ Fn( ( [ x_immutable, k_immutable ] ) => {
60488
60589
 
60489
60590
  const k = int( k_immutable ).toVar();
60490
60591
  const x = uint( x_immutable ).toVar();
@@ -60500,7 +60601,7 @@ const mx_rotl32 = /*#__PURE__*/ tslFn( ( [ x_immutable, k_immutable ] ) => {
60500
60601
  ]
60501
60602
  } );
60502
60603
 
60503
- const mx_bjmix = /*#__PURE__*/ tslFn( ( [ a, b, c ] ) => {
60604
+ const mx_bjmix = /*#__PURE__*/ Fn( ( [ a, b, c ] ) => {
60504
60605
 
60505
60606
  a.subAssign( c );
60506
60607
  a.bitXorAssign( mx_rotl32( c, int( 4 ) ) );
@@ -60523,7 +60624,7 @@ const mx_bjmix = /*#__PURE__*/ tslFn( ( [ a, b, c ] ) => {
60523
60624
 
60524
60625
  } );
60525
60626
 
60526
- const mx_bjfinal = /*#__PURE__*/ tslFn( ( [ a_immutable, b_immutable, c_immutable ] ) => {
60627
+ const mx_bjfinal = /*#__PURE__*/ Fn( ( [ a_immutable, b_immutable, c_immutable ] ) => {
60527
60628
 
60528
60629
  const c = uint( c_immutable ).toVar();
60529
60630
  const b = uint( b_immutable ).toVar();
@@ -60555,7 +60656,7 @@ const mx_bjfinal = /*#__PURE__*/ tslFn( ( [ a_immutable, b_immutable, c_immutabl
60555
60656
  ]
60556
60657
  } );
60557
60658
 
60558
- const mx_bits_to_01 = /*#__PURE__*/ tslFn( ( [ bits_immutable ] ) => {
60659
+ const mx_bits_to_01 = /*#__PURE__*/ Fn( ( [ bits_immutable ] ) => {
60559
60660
 
60560
60661
  const bits = uint( bits_immutable ).toVar();
60561
60662
 
@@ -60569,7 +60670,7 @@ const mx_bits_to_01 = /*#__PURE__*/ tslFn( ( [ bits_immutable ] ) => {
60569
60670
  ]
60570
60671
  } );
60571
60672
 
60572
- const mx_fade = /*#__PURE__*/ tslFn( ( [ t_immutable ] ) => {
60673
+ const mx_fade = /*#__PURE__*/ Fn( ( [ t_immutable ] ) => {
60573
60674
 
60574
60675
  const t = float( t_immutable ).toVar();
60575
60676
 
@@ -60583,7 +60684,7 @@ const mx_fade = /*#__PURE__*/ tslFn( ( [ t_immutable ] ) => {
60583
60684
  ]
60584
60685
  } );
60585
60686
 
60586
- const mx_hash_int_0 = /*#__PURE__*/ tslFn( ( [ x_immutable ] ) => {
60687
+ const mx_hash_int_0 = /*#__PURE__*/ Fn( ( [ x_immutable ] ) => {
60587
60688
 
60588
60689
  const x = int( x_immutable ).toVar();
60589
60690
  const len = uint( uint( 1 ) ).toVar();
@@ -60599,7 +60700,7 @@ const mx_hash_int_0 = /*#__PURE__*/ tslFn( ( [ x_immutable ] ) => {
60599
60700
  ]
60600
60701
  } );
60601
60702
 
60602
- const mx_hash_int_1 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable ] ) => {
60703
+ const mx_hash_int_1 = /*#__PURE__*/ Fn( ( [ x_immutable, y_immutable ] ) => {
60603
60704
 
60604
60705
  const y = int( y_immutable ).toVar();
60605
60706
  const x = int( x_immutable ).toVar();
@@ -60620,7 +60721,7 @@ const mx_hash_int_1 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable ] ) => {
60620
60721
  ]
60621
60722
  } );
60622
60723
 
60623
- const mx_hash_int_2 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immutable ] ) => {
60724
+ const mx_hash_int_2 = /*#__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable ] ) => {
60624
60725
 
60625
60726
  const z = int( z_immutable ).toVar();
60626
60727
  const y = int( y_immutable ).toVar();
@@ -60644,7 +60745,7 @@ const mx_hash_int_2 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immut
60644
60745
  ]
60645
60746
  } );
60646
60747
 
60647
- const mx_hash_int_3 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immutable, xx_immutable ] ) => {
60748
+ const mx_hash_int_3 = /*#__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable, xx_immutable ] ) => {
60648
60749
 
60649
60750
  const xx = int( xx_immutable ).toVar();
60650
60751
  const z = int( z_immutable ).toVar();
@@ -60672,7 +60773,7 @@ const mx_hash_int_3 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immut
60672
60773
  ]
60673
60774
  } );
60674
60775
 
60675
- const mx_hash_int_4 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immutable, xx_immutable, yy_immutable ] ) => {
60776
+ const mx_hash_int_4 = /*#__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable, xx_immutable, yy_immutable ] ) => {
60676
60777
 
60677
60778
  const yy = int( yy_immutable ).toVar();
60678
60779
  const xx = int( xx_immutable ).toVar();
@@ -60705,7 +60806,7 @@ const mx_hash_int_4 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immut
60705
60806
 
60706
60807
  const mx_hash_int = /*#__PURE__*/ overloadingFn( [ mx_hash_int_0, mx_hash_int_1, mx_hash_int_2, mx_hash_int_3, mx_hash_int_4 ] );
60707
60808
 
60708
- const mx_hash_vec3_0 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable ] ) => {
60809
+ const mx_hash_vec3_0 = /*#__PURE__*/ Fn( ( [ x_immutable, y_immutable ] ) => {
60709
60810
 
60710
60811
  const y = int( y_immutable ).toVar();
60711
60812
  const x = int( x_immutable ).toVar();
@@ -60726,7 +60827,7 @@ const mx_hash_vec3_0 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable ] ) =>
60726
60827
  ]
60727
60828
  } );
60728
60829
 
60729
- const mx_hash_vec3_1 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immutable ] ) => {
60830
+ const mx_hash_vec3_1 = /*#__PURE__*/ Fn( ( [ x_immutable, y_immutable, z_immutable ] ) => {
60730
60831
 
60731
60832
  const z = int( z_immutable ).toVar();
60732
60833
  const y = int( y_immutable ).toVar();
@@ -60751,7 +60852,7 @@ const mx_hash_vec3_1 = /*#__PURE__*/ tslFn( ( [ x_immutable, y_immutable, z_immu
60751
60852
 
60752
60853
  const mx_hash_vec3 = /*#__PURE__*/ overloadingFn( [ mx_hash_vec3_0, mx_hash_vec3_1 ] );
60753
60854
 
60754
- const mx_perlin_noise_float_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60855
+ const mx_perlin_noise_float_0 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60755
60856
 
60756
60857
  const p = vec2( p_immutable ).toVar();
60757
60858
  const X = int().toVar(), Y = int().toVar();
@@ -60771,7 +60872,7 @@ const mx_perlin_noise_float_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60771
60872
  ]
60772
60873
  } );
60773
60874
 
60774
- const mx_perlin_noise_float_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60875
+ const mx_perlin_noise_float_1 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60775
60876
 
60776
60877
  const p = vec3( p_immutable ).toVar();
60777
60878
  const X = int().toVar(), Y = int().toVar(), Z = int().toVar();
@@ -60795,7 +60896,7 @@ const mx_perlin_noise_float_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60795
60896
 
60796
60897
  const mx_perlin_noise_float = /*#__PURE__*/ overloadingFn( [ mx_perlin_noise_float_0, mx_perlin_noise_float_1 ] );
60797
60898
 
60798
- const mx_perlin_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60899
+ const mx_perlin_noise_vec3_0 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60799
60900
 
60800
60901
  const p = vec2( p_immutable ).toVar();
60801
60902
  const X = int().toVar(), Y = int().toVar();
@@ -60815,7 +60916,7 @@ const mx_perlin_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60815
60916
  ]
60816
60917
  } );
60817
60918
 
60818
- const mx_perlin_noise_vec3_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60919
+ const mx_perlin_noise_vec3_1 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60819
60920
 
60820
60921
  const p = vec3( p_immutable ).toVar();
60821
60922
  const X = int().toVar(), Y = int().toVar(), Z = int().toVar();
@@ -60839,7 +60940,7 @@ const mx_perlin_noise_vec3_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60839
60940
 
60840
60941
  const mx_perlin_noise_vec3 = /*#__PURE__*/ overloadingFn( [ mx_perlin_noise_vec3_0, mx_perlin_noise_vec3_1 ] );
60841
60942
 
60842
- const mx_cell_noise_float_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60943
+ const mx_cell_noise_float_0 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60843
60944
 
60844
60945
  const p = float( p_immutable ).toVar();
60845
60946
  const ix = int( mx_floor( p ) ).toVar();
@@ -60854,7 +60955,7 @@ const mx_cell_noise_float_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60854
60955
  ]
60855
60956
  } );
60856
60957
 
60857
- const mx_cell_noise_float_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60958
+ const mx_cell_noise_float_1 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60858
60959
 
60859
60960
  const p = vec2( p_immutable ).toVar();
60860
60961
  const ix = int( mx_floor( p.x ) ).toVar();
@@ -60870,7 +60971,7 @@ const mx_cell_noise_float_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60870
60971
  ]
60871
60972
  } );
60872
60973
 
60873
- const mx_cell_noise_float_2 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60974
+ const mx_cell_noise_float_2 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60874
60975
 
60875
60976
  const p = vec3( p_immutable ).toVar();
60876
60977
  const ix = int( mx_floor( p.x ) ).toVar();
@@ -60887,7 +60988,7 @@ const mx_cell_noise_float_2 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60887
60988
  ]
60888
60989
  } );
60889
60990
 
60890
- const mx_cell_noise_float_3 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60991
+ const mx_cell_noise_float_3 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60891
60992
 
60892
60993
  const p = vec4( p_immutable ).toVar();
60893
60994
  const ix = int( mx_floor( p.x ) ).toVar();
@@ -60907,7 +61008,7 @@ const mx_cell_noise_float_3 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60907
61008
 
60908
61009
  const mx_cell_noise_float$1 = /*#__PURE__*/ overloadingFn( [ mx_cell_noise_float_0, mx_cell_noise_float_1, mx_cell_noise_float_2, mx_cell_noise_float_3 ] );
60909
61010
 
60910
- const mx_cell_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
61011
+ const mx_cell_noise_vec3_0 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60911
61012
 
60912
61013
  const p = float( p_immutable ).toVar();
60913
61014
  const ix = int( mx_floor( p ) ).toVar();
@@ -60922,7 +61023,7 @@ const mx_cell_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60922
61023
  ]
60923
61024
  } );
60924
61025
 
60925
- const mx_cell_noise_vec3_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
61026
+ const mx_cell_noise_vec3_1 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60926
61027
 
60927
61028
  const p = vec2( p_immutable ).toVar();
60928
61029
  const ix = int( mx_floor( p.x ) ).toVar();
@@ -60938,7 +61039,7 @@ const mx_cell_noise_vec3_1 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60938
61039
  ]
60939
61040
  } );
60940
61041
 
60941
- const mx_cell_noise_vec3_2 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
61042
+ const mx_cell_noise_vec3_2 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60942
61043
 
60943
61044
  const p = vec3( p_immutable ).toVar();
60944
61045
  const ix = int( mx_floor( p.x ) ).toVar();
@@ -60955,7 +61056,7 @@ const mx_cell_noise_vec3_2 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60955
61056
  ]
60956
61057
  } );
60957
61058
 
60958
- const mx_cell_noise_vec3_3 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
61059
+ const mx_cell_noise_vec3_3 = /*#__PURE__*/ Fn( ( [ p_immutable ] ) => {
60959
61060
 
60960
61061
  const p = vec4( p_immutable ).toVar();
60961
61062
  const ix = int( mx_floor( p.x ) ).toVar();
@@ -60975,7 +61076,7 @@ const mx_cell_noise_vec3_3 = /*#__PURE__*/ tslFn( ( [ p_immutable ] ) => {
60975
61076
 
60976
61077
  const mx_cell_noise_vec3 = /*#__PURE__*/ overloadingFn( [ mx_cell_noise_vec3_0, mx_cell_noise_vec3_1, mx_cell_noise_vec3_2, mx_cell_noise_vec3_3 ] );
60977
61078
 
60978
- const mx_fractal_noise_float$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
61079
+ const mx_fractal_noise_float$1 = /*#__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
60979
61080
 
60980
61081
  const diminish = float( diminish_immutable ).toVar();
60981
61082
  const lacunarity = float( lacunarity_immutable ).toVar();
@@ -60984,7 +61085,7 @@ const mx_fractal_noise_float$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_i
60984
61085
  const result = float( 0.0 ).toVar();
60985
61086
  const amplitude = float( 1.0 ).toVar();
60986
61087
 
60987
- loop( octaves, () => {
61088
+ Loop( octaves, () => {
60988
61089
 
60989
61090
  result.addAssign( amplitude.mul( mx_perlin_noise_float( p ) ) );
60990
61091
  amplitude.mulAssign( diminish );
@@ -61005,7 +61106,7 @@ const mx_fractal_noise_float$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_i
61005
61106
  ]
61006
61107
  } );
61007
61108
 
61008
- const mx_fractal_noise_vec3$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
61109
+ const mx_fractal_noise_vec3$1 = /*#__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
61009
61110
 
61010
61111
  const diminish = float( diminish_immutable ).toVar();
61011
61112
  const lacunarity = float( lacunarity_immutable ).toVar();
@@ -61014,7 +61115,7 @@ const mx_fractal_noise_vec3$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_im
61014
61115
  const result = vec3( 0.0 ).toVar();
61015
61116
  const amplitude = float( 1.0 ).toVar();
61016
61117
 
61017
- loop( octaves, () => {
61118
+ Loop( octaves, () => {
61018
61119
 
61019
61120
  result.addAssign( amplitude.mul( mx_perlin_noise_vec3( p ) ) );
61020
61121
  amplitude.mulAssign( diminish );
@@ -61035,7 +61136,7 @@ const mx_fractal_noise_vec3$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_im
61035
61136
  ]
61036
61137
  } );
61037
61138
 
61038
- const mx_fractal_noise_vec2$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
61139
+ const mx_fractal_noise_vec2$1 = /*#__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
61039
61140
 
61040
61141
  const diminish = float( diminish_immutable ).toVar();
61041
61142
  const lacunarity = float( lacunarity_immutable ).toVar();
@@ -61055,7 +61156,7 @@ const mx_fractal_noise_vec2$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_im
61055
61156
  ]
61056
61157
  } );
61057
61158
 
61058
- const mx_fractal_noise_vec4$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
61159
+ const mx_fractal_noise_vec4$1 = /*#__PURE__*/ Fn( ( [ p_immutable, octaves_immutable, lacunarity_immutable, diminish_immutable ] ) => {
61059
61160
 
61060
61161
  const diminish = float( diminish_immutable ).toVar();
61061
61162
  const lacunarity = float( lacunarity_immutable ).toVar();
@@ -61077,7 +61178,7 @@ const mx_fractal_noise_vec4$1 = /*#__PURE__*/ tslFn( ( [ p_immutable, octaves_im
61077
61178
  ]
61078
61179
  } );
61079
61180
 
61080
- const mx_worley_distance_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, x_immutable, y_immutable, xoff_immutable, yoff_immutable, jitter_immutable, metric_immutable ] ) => {
61181
+ const mx_worley_distance_0 = /*#__PURE__*/ Fn( ( [ p_immutable, x_immutable, y_immutable, xoff_immutable, yoff_immutable, jitter_immutable, metric_immutable ] ) => {
61081
61182
 
61082
61183
  const metric = int( metric_immutable ).toVar();
61083
61184
  const jitter = float( jitter_immutable ).toVar();
@@ -61122,7 +61223,7 @@ const mx_worley_distance_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, x_immutable,
61122
61223
  ]
61123
61224
  } );
61124
61225
 
61125
- const mx_worley_distance_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, x_immutable, y_immutable, z_immutable, xoff_immutable, yoff_immutable, zoff_immutable, jitter_immutable, metric_immutable ] ) => {
61226
+ const mx_worley_distance_1 = /*#__PURE__*/ Fn( ( [ p_immutable, x_immutable, y_immutable, z_immutable, xoff_immutable, yoff_immutable, zoff_immutable, jitter_immutable, metric_immutable ] ) => {
61126
61227
 
61127
61228
  const metric = int( metric_immutable ).toVar();
61128
61229
  const jitter = float( jitter_immutable ).toVar();
@@ -61172,7 +61273,7 @@ const mx_worley_distance_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, x_immutable,
61172
61273
 
61173
61274
  const mx_worley_distance = /*#__PURE__*/ overloadingFn( [ mx_worley_distance_0, mx_worley_distance_1 ] );
61174
61275
 
61175
- const mx_worley_noise_float_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61276
+ const mx_worley_noise_float_0 = /*#__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61176
61277
 
61177
61278
  const metric = int( metric_immutable ).toVar();
61178
61279
  const jitter = float( jitter_immutable ).toVar();
@@ -61181,9 +61282,9 @@ const mx_worley_noise_float_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_imm
61181
61282
  const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
61182
61283
  const sqdist = float( 1e6 ).toVar();
61183
61284
 
61184
- loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61285
+ Loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61185
61286
 
61186
- loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61287
+ Loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61187
61288
 
61188
61289
  const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
61189
61290
  sqdist.assign( min$1( sqdist, dist ) );
@@ -61210,7 +61311,7 @@ const mx_worley_noise_float_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_imm
61210
61311
  ]
61211
61312
  } );
61212
61313
 
61213
- const mx_worley_noise_vec2_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61314
+ const mx_worley_noise_vec2_0 = /*#__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61214
61315
 
61215
61316
  const metric = int( metric_immutable ).toVar();
61216
61317
  const jitter = float( jitter_immutable ).toVar();
@@ -61219,9 +61320,9 @@ const mx_worley_noise_vec2_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61219
61320
  const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
61220
61321
  const sqdist = vec2( 1e6, 1e6 ).toVar();
61221
61322
 
61222
- loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61323
+ Loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61223
61324
 
61224
- loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61325
+ Loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61225
61326
 
61226
61327
  const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
61227
61328
 
@@ -61230,7 +61331,7 @@ const mx_worley_noise_vec2_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61230
61331
  sqdist.y.assign( sqdist.x );
61231
61332
  sqdist.x.assign( dist );
61232
61333
 
61233
- } ).elseif( dist.lessThan( sqdist.y ), () => {
61334
+ } ).ElseIf( dist.lessThan( sqdist.y ), () => {
61234
61335
 
61235
61336
  sqdist.y.assign( dist );
61236
61337
 
@@ -61258,7 +61359,7 @@ const mx_worley_noise_vec2_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61258
61359
  ]
61259
61360
  } );
61260
61361
 
61261
- const mx_worley_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61362
+ const mx_worley_noise_vec3_0 = /*#__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61262
61363
 
61263
61364
  const metric = int( metric_immutable ).toVar();
61264
61365
  const jitter = float( jitter_immutable ).toVar();
@@ -61267,9 +61368,9 @@ const mx_worley_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61267
61368
  const localpos = vec2( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ) ).toVar();
61268
61369
  const sqdist = vec3( 1e6, 1e6, 1e6 ).toVar();
61269
61370
 
61270
- loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61371
+ Loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61271
61372
 
61272
- loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61373
+ Loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61273
61374
 
61274
61375
  const dist = float( mx_worley_distance( localpos, x, y, X, Y, jitter, metric ) ).toVar();
61275
61376
 
@@ -61279,12 +61380,12 @@ const mx_worley_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61279
61380
  sqdist.y.assign( sqdist.x );
61280
61381
  sqdist.x.assign( dist );
61281
61382
 
61282
- } ).elseif( dist.lessThan( sqdist.y ), () => {
61383
+ } ).ElseIf( dist.lessThan( sqdist.y ), () => {
61283
61384
 
61284
61385
  sqdist.z.assign( sqdist.y );
61285
61386
  sqdist.y.assign( dist );
61286
61387
 
61287
- } ).elseif( dist.lessThan( sqdist.z ), () => {
61388
+ } ).ElseIf( dist.lessThan( sqdist.z ), () => {
61288
61389
 
61289
61390
  sqdist.z.assign( dist );
61290
61391
 
@@ -61312,7 +61413,7 @@ const mx_worley_noise_vec3_0 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61312
61413
  ]
61313
61414
  } );
61314
61415
 
61315
- const mx_worley_noise_float_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61416
+ const mx_worley_noise_float_1 = /*#__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61316
61417
 
61317
61418
  const metric = int( metric_immutable ).toVar();
61318
61419
  const jitter = float( jitter_immutable ).toVar();
@@ -61321,11 +61422,11 @@ const mx_worley_noise_float_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_imm
61321
61422
  const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
61322
61423
  const sqdist = float( 1e6 ).toVar();
61323
61424
 
61324
- loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61425
+ Loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61325
61426
 
61326
- loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61427
+ Loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61327
61428
 
61328
- loop( { start: - 1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
61429
+ Loop( { start: - 1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
61329
61430
 
61330
61431
  const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
61331
61432
  sqdist.assign( min$1( sqdist, dist ) );
@@ -61356,7 +61457,7 @@ const mx_worley_noise_float_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_imm
61356
61457
 
61357
61458
  const mx_worley_noise_float$1 = /*#__PURE__*/ overloadingFn( [ mx_worley_noise_float_0, mx_worley_noise_float_1 ] );
61358
61459
 
61359
- const mx_worley_noise_vec2_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61460
+ const mx_worley_noise_vec2_1 = /*#__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61360
61461
 
61361
61462
  const metric = int( metric_immutable ).toVar();
61362
61463
  const jitter = float( jitter_immutable ).toVar();
@@ -61365,11 +61466,11 @@ const mx_worley_noise_vec2_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61365
61466
  const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
61366
61467
  const sqdist = vec2( 1e6, 1e6 ).toVar();
61367
61468
 
61368
- loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61469
+ Loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61369
61470
 
61370
- loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61471
+ Loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61371
61472
 
61372
- loop( { start: - 1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
61473
+ Loop( { start: - 1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
61373
61474
 
61374
61475
  const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
61375
61476
 
@@ -61378,7 +61479,7 @@ const mx_worley_noise_vec2_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61378
61479
  sqdist.y.assign( sqdist.x );
61379
61480
  sqdist.x.assign( dist );
61380
61481
 
61381
- } ).elseif( dist.lessThan( sqdist.y ), () => {
61482
+ } ).ElseIf( dist.lessThan( sqdist.y ), () => {
61382
61483
 
61383
61484
  sqdist.y.assign( dist );
61384
61485
 
@@ -61410,7 +61511,7 @@ const mx_worley_noise_vec2_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61410
61511
 
61411
61512
  const mx_worley_noise_vec2$1 = /*#__PURE__*/ overloadingFn( [ mx_worley_noise_vec2_0, mx_worley_noise_vec2_1 ] );
61412
61513
 
61413
- const mx_worley_noise_vec3_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61514
+ const mx_worley_noise_vec3_1 = /*#__PURE__*/ Fn( ( [ p_immutable, jitter_immutable, metric_immutable ] ) => {
61414
61515
 
61415
61516
  const metric = int( metric_immutable ).toVar();
61416
61517
  const jitter = float( jitter_immutable ).toVar();
@@ -61419,11 +61520,11 @@ const mx_worley_noise_vec3_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61419
61520
  const localpos = vec3( mx_floorfrac( p.x, X ), mx_floorfrac( p.y, Y ), mx_floorfrac( p.z, Z ) ).toVar();
61420
61521
  const sqdist = vec3( 1e6, 1e6, 1e6 ).toVar();
61421
61522
 
61422
- loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61523
+ Loop( { start: - 1, end: int( 1 ), name: 'x', condition: '<=' }, ( { x } ) => {
61423
61524
 
61424
- loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61525
+ Loop( { start: - 1, end: int( 1 ), name: 'y', condition: '<=' }, ( { y } ) => {
61425
61526
 
61426
- loop( { start: - 1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
61527
+ Loop( { start: - 1, end: int( 1 ), name: 'z', condition: '<=' }, ( { z } ) => {
61427
61528
 
61428
61529
  const dist = float( mx_worley_distance( localpos, x, y, z, X, Y, Z, jitter, metric ) ).toVar();
61429
61530
 
@@ -61433,12 +61534,12 @@ const mx_worley_noise_vec3_1 = /*#__PURE__*/ tslFn( ( [ p_immutable, jitter_immu
61433
61534
  sqdist.y.assign( sqdist.x );
61434
61535
  sqdist.x.assign( dist );
61435
61536
 
61436
- } ).elseif( dist.lessThan( sqdist.y ), () => {
61537
+ } ).ElseIf( dist.lessThan( sqdist.y ), () => {
61437
61538
 
61438
61539
  sqdist.z.assign( sqdist.y );
61439
61540
  sqdist.y.assign( dist );
61440
61541
 
61441
- } ).elseif( dist.lessThan( sqdist.z ), () => {
61542
+ } ).ElseIf( dist.lessThan( sqdist.z ), () => {
61442
61543
 
61443
61544
  sqdist.z.assign( dist );
61444
61545
 
@@ -61474,7 +61575,7 @@ const mx_worley_noise_vec3$1 = /*#__PURE__*/ overloadingFn( [ mx_worley_noise_ve
61474
61575
  // https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/stdlib/genglsl/lib/mx_hsv.glsl
61475
61576
 
61476
61577
 
61477
- const mx_hsvtorgb = /*#__PURE__*/ tslFn( ( [ hsv_immutable ] ) => {
61578
+ const mx_hsvtorgb = /*#__PURE__*/ Fn( ( [ hsv_immutable ] ) => {
61478
61579
 
61479
61580
  const hsv = vec3( hsv_immutable ).toVar();
61480
61581
  const h = float( hsv.x ).toVar();
@@ -61485,7 +61586,7 @@ const mx_hsvtorgb = /*#__PURE__*/ tslFn( ( [ hsv_immutable ] ) => {
61485
61586
 
61486
61587
  return vec3( v, v, v );
61487
61588
 
61488
- } ).else( () => {
61589
+ } ).Else( () => {
61489
61590
 
61490
61591
  h.assign( mul( 6.0, h.sub( floor( h ) ) ) );
61491
61592
  const hi = int( trunc( h ) ).toVar();
@@ -61498,19 +61599,19 @@ const mx_hsvtorgb = /*#__PURE__*/ tslFn( ( [ hsv_immutable ] ) => {
61498
61599
 
61499
61600
  return vec3( v, t, p );
61500
61601
 
61501
- } ).elseif( hi.equal( int( 1 ) ), () => {
61602
+ } ).ElseIf( hi.equal( int( 1 ) ), () => {
61502
61603
 
61503
61604
  return vec3( q, v, p );
61504
61605
 
61505
- } ).elseif( hi.equal( int( 2 ) ), () => {
61606
+ } ).ElseIf( hi.equal( int( 2 ) ), () => {
61506
61607
 
61507
61608
  return vec3( p, v, t );
61508
61609
 
61509
- } ).elseif( hi.equal( int( 3 ) ), () => {
61610
+ } ).ElseIf( hi.equal( int( 3 ) ), () => {
61510
61611
 
61511
61612
  return vec3( p, q, v );
61512
61613
 
61513
- } ).elseif( hi.equal( int( 4 ) ), () => {
61614
+ } ).ElseIf( hi.equal( int( 4 ) ), () => {
61514
61615
 
61515
61616
  return vec3( t, p, v );
61516
61617
 
@@ -61528,7 +61629,7 @@ const mx_hsvtorgb = /*#__PURE__*/ tslFn( ( [ hsv_immutable ] ) => {
61528
61629
  ]
61529
61630
  } );
61530
61631
 
61531
- const mx_rgbtohsv = /*#__PURE__*/ tslFn( ( [ c_immutable ] ) => {
61632
+ const mx_rgbtohsv = /*#__PURE__*/ Fn( ( [ c_immutable ] ) => {
61532
61633
 
61533
61634
  const c = vec3( c_immutable ).toVar();
61534
61635
  const r = float( c.x ).toVar();
@@ -61544,7 +61645,7 @@ const mx_rgbtohsv = /*#__PURE__*/ tslFn( ( [ c_immutable ] ) => {
61544
61645
 
61545
61646
  s.assign( delta.div( maxcomp ) );
61546
61647
 
61547
- } ).else( () => {
61648
+ } ).Else( () => {
61548
61649
 
61549
61650
  s.assign( 0.0 );
61550
61651
 
@@ -61554,17 +61655,17 @@ const mx_rgbtohsv = /*#__PURE__*/ tslFn( ( [ c_immutable ] ) => {
61554
61655
 
61555
61656
  h.assign( 0.0 );
61556
61657
 
61557
- } ).else( () => {
61658
+ } ).Else( () => {
61558
61659
 
61559
61660
  If( r.greaterThanEqual( maxcomp ), () => {
61560
61661
 
61561
61662
  h.assign( g.sub( b ).div( delta ) );
61562
61663
 
61563
- } ).elseif( g.greaterThanEqual( maxcomp ), () => {
61664
+ } ).ElseIf( g.greaterThanEqual( maxcomp ), () => {
61564
61665
 
61565
61666
  h.assign( add( 2.0, b.sub( r ).div( delta ) ) );
61566
61667
 
61567
- } ).else( () => {
61668
+ } ).Else( () => {
61568
61669
 
61569
61670
  h.assign( add( 4.0, r.sub( g ).div( delta ) ) );
61570
61671
 
@@ -61594,7 +61695,7 @@ const mx_rgbtohsv = /*#__PURE__*/ tslFn( ( [ c_immutable ] ) => {
61594
61695
  // https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/libraries/stdlib/genglsl/lib/mx_transform_color.glsl
61595
61696
 
61596
61697
 
61597
- const mx_srgb_texture_to_lin_rec709 = /*#__PURE__*/ tslFn( ( [ color_immutable ] ) => {
61698
+ const mx_srgb_texture_to_lin_rec709 = /*#__PURE__*/ Fn( ( [ color_immutable ] ) => {
61598
61699
 
61599
61700
  const color = vec3( color_immutable ).toVar();
61600
61701
  const isAbove = bvec3( greaterThan( color, vec3( 0.04045 ) ) ).toVar();
@@ -61930,6 +62031,30 @@ class RenderContext {
61930
62031
 
61931
62032
  }
61932
62033
 
62034
+ getCacheKey() {
62035
+
62036
+ return getCacheKey( this );
62037
+
62038
+ }
62039
+
62040
+ }
62041
+
62042
+ function getCacheKey( renderContext ) {
62043
+
62044
+ const { textures, activeCubeFace } = renderContext;
62045
+
62046
+ let key = '';
62047
+
62048
+ for ( const texture of textures ) {
62049
+
62050
+ key += texture.id + ',';
62051
+
62052
+ }
62053
+
62054
+ key += activeCubeFace;
62055
+
62056
+ return key;
62057
+
61933
62058
  }
61934
62059
 
61935
62060
  class RenderContexts {
@@ -68203,7 +68328,6 @@ class WebGLTextureUtils {
68203
68328
 
68204
68329
  deallocateRenderBuffers( renderTarget ) {
68205
68330
 
68206
-
68207
68331
  const { gl, backend } = this;
68208
68332
 
68209
68333
  // remove framebuffer reference
@@ -68213,31 +68337,36 @@ class WebGLTextureUtils {
68213
68337
 
68214
68338
  renderContextData.renderBufferStorageSetup = undefined;
68215
68339
 
68216
- if ( renderContextData.framebuffer ) {
68340
+ if ( renderContextData.framebuffers ) {
68341
+
68342
+ for ( const cacheKey in renderContextData.framebuffers ) {
68343
+
68344
+ gl.deleteFramebuffer( renderContextData.framebuffers[ cacheKey ] );
68217
68345
 
68218
- gl.deleteFramebuffer( renderContextData.framebuffer );
68219
- renderContextData.framebuffer = undefined;
68346
+ }
68347
+
68348
+ delete renderContextData.framebuffers;
68220
68349
 
68221
68350
  }
68222
68351
 
68223
68352
  if ( renderContextData.depthRenderbuffer ) {
68224
68353
 
68225
68354
  gl.deleteRenderbuffer( renderContextData.depthRenderbuffer );
68226
- renderContextData.depthRenderbuffer = undefined;
68355
+ delete renderContextData.depthRenderbuffer;
68227
68356
 
68228
68357
  }
68229
68358
 
68230
68359
  if ( renderContextData.stencilRenderbuffer ) {
68231
68360
 
68232
68361
  gl.deleteRenderbuffer( renderContextData.stencilRenderbuffer );
68233
- renderContextData.stencilRenderbuffer = undefined;
68362
+ delete renderContextData.stencilRenderbuffer;
68234
68363
 
68235
68364
  }
68236
68365
 
68237
68366
  if ( renderContextData.msaaFrameBuffer ) {
68238
68367
 
68239
68368
  gl.deleteFramebuffer( renderContextData.msaaFrameBuffer );
68240
- renderContextData.msaaFrameBuffer = undefined;
68369
+ delete renderContextData.msaaFrameBuffer;
68241
68370
 
68242
68371
  }
68243
68372
 
@@ -68249,7 +68378,7 @@ class WebGLTextureUtils {
68249
68378
 
68250
68379
  }
68251
68380
 
68252
- renderContextData.msaaRenderbuffers = undefined;
68381
+ delete renderContextData.msaaRenderbuffers;
68253
68382
 
68254
68383
  }
68255
68384
 
@@ -69014,12 +69143,13 @@ class WebGLBackend extends Backend {
69014
69143
  const renderTargetContextData = this.get( renderContext.renderTarget );
69015
69144
 
69016
69145
  const { samples } = renderContext.renderTarget;
69017
- const fb = renderTargetContextData.framebuffer;
69018
-
69019
- const mask = gl.COLOR_BUFFER_BIT;
69020
69146
 
69021
69147
  if ( samples > 0 ) {
69022
69148
 
69149
+ const fb = renderTargetContextData.framebuffers[ renderContext.getCacheKey() ];
69150
+
69151
+ const mask = gl.COLOR_BUFFER_BIT;
69152
+
69023
69153
  const msaaFrameBuffer = renderTargetContextData.msaaFrameBuffer;
69024
69154
 
69025
69155
  const textures = renderContext.textures;
@@ -69995,38 +70125,38 @@ class WebGLBackend extends Backend {
69995
70125
 
69996
70126
  }
69997
70127
 
69998
- _setFramebuffer( renderContext ) {
70128
+ _setFramebuffer( descriptor ) {
69999
70129
 
70000
70130
  const { gl, state } = this;
70001
70131
 
70002
70132
  let currentFrameBuffer = null;
70003
70133
 
70004
- if ( renderContext.textures !== null ) {
70134
+ if ( descriptor.textures !== null ) {
70005
70135
 
70006
- const renderTarget = renderContext.renderTarget;
70136
+ const renderTarget = descriptor.renderTarget;
70007
70137
  const renderTargetContextData = this.get( renderTarget );
70008
70138
  const { samples, depthBuffer, stencilBuffer } = renderTarget;
70009
- const cubeFace = this.renderer._activeCubeFace;
70139
+
70010
70140
  const isCube = renderTarget.isWebGLCubeRenderTarget === true;
70011
70141
 
70012
70142
  let msaaFb = renderTargetContextData.msaaFrameBuffer;
70013
70143
  let depthRenderbuffer = renderTargetContextData.depthRenderbuffer;
70014
70144
 
70145
+ const cacheKey = getCacheKey( descriptor );
70146
+
70015
70147
  let fb;
70016
70148
 
70017
70149
  if ( isCube ) {
70018
70150
 
70019
- if ( renderTargetContextData.cubeFramebuffers === undefined ) {
70151
+ renderTargetContextData.cubeFramebuffers || ( renderTargetContextData.cubeFramebuffers = {} );
70020
70152
 
70021
- renderTargetContextData.cubeFramebuffers = [];
70022
-
70023
- }
70024
-
70025
- fb = renderTargetContextData.cubeFramebuffers[ cubeFace ];
70153
+ fb = renderTargetContextData.cubeFramebuffers[ cacheKey ];
70026
70154
 
70027
70155
  } else {
70028
70156
 
70029
- fb = renderTargetContextData.framebuffer;
70157
+ renderTargetContextData.framebuffers || ( renderTargetContextData.framebuffers = {} );
70158
+
70159
+ fb = renderTargetContextData.framebuffers[ cacheKey ];
70030
70160
 
70031
70161
  }
70032
70162
 
@@ -70036,22 +70166,27 @@ class WebGLBackend extends Backend {
70036
70166
 
70037
70167
  state.bindFramebuffer( gl.FRAMEBUFFER, fb );
70038
70168
 
70039
- const textures = renderContext.textures;
70169
+ const textures = descriptor.textures;
70040
70170
 
70041
70171
  if ( isCube ) {
70042
70172
 
70043
- renderTargetContextData.cubeFramebuffers[ cubeFace ] = fb;
70173
+ renderTargetContextData.cubeFramebuffers[ cacheKey ] = fb;
70174
+
70044
70175
  const { textureGPU } = this.get( textures[ 0 ] );
70045
70176
 
70177
+ const cubeFace = this.renderer._activeCubeFace;
70178
+
70046
70179
  gl.framebufferTexture2D( gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_CUBE_MAP_POSITIVE_X + cubeFace, textureGPU, 0 );
70047
70180
 
70048
70181
  } else {
70049
70182
 
70183
+ renderTargetContextData.framebuffers[ cacheKey ] = fb;
70184
+
70050
70185
  for ( let i = 0; i < textures.length; i ++ ) {
70051
70186
 
70052
70187
  const texture = textures[ i ];
70053
70188
  const textureData = this.get( texture );
70054
- textureData.renderTarget = renderContext.renderTarget;
70189
+ textureData.renderTarget = descriptor.renderTarget;
70055
70190
 
70056
70191
  const attachment = gl.COLOR_ATTACHMENT0 + i;
70057
70192
 
@@ -70059,15 +70194,13 @@ class WebGLBackend extends Backend {
70059
70194
 
70060
70195
  }
70061
70196
 
70062
- renderTargetContextData.framebuffer = fb;
70063
-
70064
- state.drawBuffers( renderContext, fb );
70197
+ state.drawBuffers( descriptor, fb );
70065
70198
 
70066
70199
  }
70067
70200
 
70068
- if ( renderContext.depthTexture !== null ) {
70201
+ if ( descriptor.depthTexture !== null ) {
70069
70202
 
70070
- const textureData = this.get( renderContext.depthTexture );
70203
+ const textureData = this.get( descriptor.depthTexture );
70071
70204
  const depthStyle = stencilBuffer ? gl.DEPTH_STENCIL_ATTACHMENT : gl.DEPTH_ATTACHMENT;
70072
70205
 
70073
70206
  gl.framebufferTexture2D( gl.FRAMEBUFFER, depthStyle, gl.TEXTURE_2D, textureData.textureGPU, 0 );
@@ -70088,11 +70221,10 @@ class WebGLBackend extends Backend {
70088
70221
 
70089
70222
  const msaaRenderbuffers = [];
70090
70223
 
70091
- const textures = renderContext.textures;
70224
+ const textures = descriptor.textures;
70092
70225
 
70093
70226
  for ( let i = 0; i < textures.length; i ++ ) {
70094
70227
 
70095
-
70096
70228
  msaaRenderbuffers[ i ] = gl.createRenderbuffer();
70097
70229
 
70098
70230
  gl.bindRenderbuffer( gl.RENDERBUFFER, msaaRenderbuffers[ i ] );
@@ -70106,10 +70238,10 @@ class WebGLBackend extends Backend {
70106
70238
 
70107
70239
  }
70108
70240
 
70109
- const texture = renderContext.textures[ i ];
70241
+ const texture = descriptor.textures[ i ];
70110
70242
  const textureData = this.get( texture );
70111
70243
 
70112
- gl.renderbufferStorageMultisample( gl.RENDERBUFFER, samples, textureData.glInternalFormat, renderContext.width, renderContext.height );
70244
+ gl.renderbufferStorageMultisample( gl.RENDERBUFFER, samples, textureData.glInternalFormat, descriptor.width, descriptor.height );
70113
70245
  gl.framebufferRenderbuffer( gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + i, gl.RENDERBUFFER, msaaRenderbuffers[ i ] );
70114
70246
 
70115
70247
 
@@ -70121,7 +70253,7 @@ class WebGLBackend extends Backend {
70121
70253
  if ( depthRenderbuffer === undefined ) {
70122
70254
 
70123
70255
  depthRenderbuffer = gl.createRenderbuffer();
70124
- this.textureUtils.setupRenderBufferStorage( depthRenderbuffer, renderContext );
70256
+ this.textureUtils.setupRenderBufferStorage( depthRenderbuffer, descriptor );
70125
70257
 
70126
70258
  renderTargetContextData.depthRenderbuffer = depthRenderbuffer;
70127
70259
 
@@ -72643,6 +72775,22 @@ ${ flowData.code }
72643
72775
 
72644
72776
  }
72645
72777
 
72778
+ getSubgroupSize() {
72779
+
72780
+ this.enableSubGroups();
72781
+
72782
+ return this.getBuiltin( 'subgroup_size', 'subgroupSize', 'u32', 'attribute' );
72783
+
72784
+ }
72785
+
72786
+ getSubgroupIndex() {
72787
+
72788
+ this.enableSubGroups();
72789
+
72790
+ return this.getBuiltin( 'subgroup_invocation_id', 'subgroupIndex', 'u32', 'attribute' );
72791
+
72792
+ }
72793
+
72646
72794
  getDrawIndex() {
72647
72795
 
72648
72796
  return null;
@@ -72675,8 +72823,8 @@ ${ flowData.code }
72675
72823
 
72676
72824
  enableDirective( name, shaderStage = this.shaderStage ) {
72677
72825
 
72678
- const stage = this.directives[ shaderStage ] || ( this.directives[ shaderStage ] = [] );
72679
- stage.push( name );
72826
+ const stage = this.directives[ shaderStage ] || ( this.directives[ shaderStage ] = new Set() );
72827
+ stage.add( name );
72680
72828
 
72681
72829
  }
72682
72830
 
@@ -72699,6 +72847,18 @@ ${ flowData.code }
72699
72847
 
72700
72848
  }
72701
72849
 
72850
+ enableSubGroups() {
72851
+
72852
+ this.enableDirective( 'subgroups' );
72853
+
72854
+ }
72855
+
72856
+ enableSubgroupsF16() {
72857
+
72858
+ this.enableDirective( 'subgroups-f16' );
72859
+
72860
+ }
72861
+
72702
72862
  enableClipDistances() {
72703
72863
 
72704
72864
  this.enableDirective( 'clip_distances' );
@@ -74805,22 +74965,16 @@ class WebGPUBackend extends Backend {
74805
74965
 
74806
74966
  let descriptors = renderTargetData.descriptors;
74807
74967
 
74808
- if ( descriptors === undefined ) {
74809
-
74810
- descriptors = [];
74811
-
74812
- renderTargetData.descriptors = descriptors;
74813
-
74814
- }
74815
-
74816
- if ( renderTargetData.width !== renderTarget.width ||
74968
+ if ( descriptors === undefined ||
74969
+ renderTargetData.width !== renderTarget.width ||
74817
74970
  renderTargetData.height !== renderTarget.height ||
74818
74971
  renderTargetData.activeMipmapLevel !== renderTarget.activeMipmapLevel ||
74819
- renderTargetData.samples !== renderTarget.samples ||
74820
- descriptors.length !== renderTarget.textures.length
74972
+ renderTargetData.samples !== renderTarget.samples
74821
74973
  ) {
74822
74974
 
74823
- descriptors.length = 0;
74975
+ descriptors = {};
74976
+
74977
+ renderTargetData.descriptors = descriptors;
74824
74978
 
74825
74979
  // dispose
74826
74980
 
@@ -74836,7 +74990,9 @@ class WebGPUBackend extends Backend {
74836
74990
 
74837
74991
  }
74838
74992
 
74839
- let descriptor = descriptors[ renderContext.activeCubeFace ];
74993
+ const cacheKey = renderContext.getCacheKey();
74994
+
74995
+ let descriptor = descriptors[ cacheKey ];
74840
74996
 
74841
74997
  if ( descriptor === undefined ) {
74842
74998
 
@@ -74888,7 +75044,7 @@ class WebGPUBackend extends Backend {
74888
75044
  depthStencilAttachment
74889
75045
  };
74890
75046
 
74891
- descriptors[ renderContext.activeCubeFace ] = descriptor;
75047
+ descriptors[ cacheKey ] = descriptor;
74892
75048
 
74893
75049
  renderTargetData.width = renderTarget.width;
74894
75050
  renderTargetData.height = renderTarget.height;
@@ -76278,4 +76434,4 @@ if ( typeof window !== 'undefined' ) {
76278
76434
 
76279
76435
  }
76280
76436
 
76281
- export { ACESFilmicToneMapping, AONode, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AfterImageNode, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightNode, AnalyticLightNode, AnamorphicNode, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrayElementNode, ArrowHelper, AssignNode, AttachedBindMode, AttributeNode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BRDF_GGX, BRDF_Lambert, BackSide, BasicDepthPacking, BasicEnvironmentNode, BasicShadowMap$1 as BasicShadowMap, BatchNode, BatchedMesh, BlendModeNode, BloomNode, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, Break, BufferAttribute, BufferAttributeNode, BufferGeometry, BufferGeometryLoader, BufferNode, BumpMapNode, BypassNode, ByteType, Cache, CacheNode, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CheckerNode, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, CodeNode, Color, ColorAdjustmentNode, ColorKeyframeTrack, ColorManagement, ColorSpaceNode, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ComputeNode, CondNode, ConeGeometry, ConstNode, ConstantAlphaFactor, ConstantColorFactor, ContextNode, Continue, ConvertNode, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeTextureNode, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, DFGApprox, D_GGX, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DenoiseNode, DepthFormat, DepthOfFieldNode, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DirectionalLightNode, DiscardNode, DiscreteInterpolant, DisplayP3ColorSpace, DodecahedronGeometry, DotScreenNode, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EPSILON, EdgesGeometry, EllipseCurve, EnvironmentNode, EqualCompare, EqualDepth, EqualStencilFunc, EquirectUVNode, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExpressionNode, ExtrudeGeometry, FXAANode, F_Schlick, FileLoader, FilmNode, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FogExp2Node, FogNode, FogRangeNode, FramebufferTexture, FrontFacingNode, FrontSide, Frustum, FunctionCallNode, FunctionNode, FunctionOverloadingNode, GLBufferAttribute, GLSL1, GLSL3, GLSLNodeParser, GTAONode, GaussianBlurNode, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HashNode, HemisphereLight, HemisphereLightHelper, HemisphereLightNode, IESSpotLight, IESSpotLightNode, INFINITY, IcosahedronGeometry, If, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, IndexNode, InstanceNode, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, InstancedPointsNodeMaterial, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, IrradianceNode, JoinNode, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightNode, LightProbe, LightingContextNode, LightingModel, LightingNode, LightsNode, Line, Line2NodeMaterial, Line3, LineBasicMaterial, LineBasicNodeMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineDashedNodeMaterial, LineLoop, LineSegments, LinearDisplayP3ColorSpace, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopNode, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, Lut3DNode, MOUSE, MRTNode, MatcapUVNode, Material, MaterialLoader, MaterialNode, MaterialReferenceNode, MathNode, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, MaxMipLevelNode, Mesh, MeshBasicMaterial, MeshBasicNodeMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshLambertNodeMaterial, MeshMatcapMaterial, MeshMatcapNodeMaterial, MeshNormalMaterial, MeshNormalNodeMaterial, MeshPhongMaterial, MeshPhongNodeMaterial, MeshPhysicalMaterial, MeshPhysicalNodeMaterial, MeshSSSNodeMaterial, MeshStandardMaterial, MeshStandardNodeMaterial, MeshToonMaterial, MeshToonNodeMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, ModelNode, ModelViewProjectionNode, MorphNode, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, Node, NodeAttribute, NodeBuilder, NodeCache, NodeCode, NodeFrame, NodeFunctionInput, NodeKeywords, NodeLoader, NodeMaterial, NodeMaterialLoader, NodeObjectLoader, NodeShaderStage, NodeType, NodeUniform, NodeUpdateType, NodeUtils, NodeVar, NodeVarying, NormalAnimationBlendMode, NormalBlending, NormalMapNode, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, Object3DNode, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OperatorNode, OrthographicCamera, OscNode, OutputStructNode, P3Primaries, PCFShadowMap$1 as PCFShadowMap, PCFSoftShadowMap$1 as PCFSoftShadowMap, PI, PI2, PMREMGenerator, PMREMNode, PackingNode, ParameterNode, PassNode, Path, PerspectiveCamera, PhongLightingModel, PhysicalLightingModel, PixelationPassNode, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, PointLightNode, PointUVNode, Points, PointsMaterial, PointsNodeMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PostProcessing, PosterizeNode, PropertyBinding, PropertyMixer, PropertyNode, QuadMesh, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDepthPacking, RGBFormat, RGBIntegerFormat, RGBShiftNode, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGDepthPacking, RGFormat, RGIntegerFormat, RTTNode, RangeNode, RawShaderMaterial, Ray, Raycaster, Rec709Primaries, RectAreaLight, RectAreaLightNode, RedFormat, RedIntegerFormat, ReferenceNode, ReflectorNode, ReinhardToneMapping, RemapNode, RenderOutputNode, RenderTarget, RendererReferenceNode, RepeatWrapping, ReplaceStencilOp, Return, ReverseSubtractEquation, RingGeometry, RotateNode, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, SceneNode, Schlick_to_F0, ScriptableNode, ScriptableValueNode, SetNode, ShaderMaterial, ShaderNode, ShadowMaterial, ShadowNodeMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, SkinningNode, SobelOperatorNode, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SplitNode, SpotLight, SpotLightHelper, SpotLightNode, Sprite, SpriteMaterial, SpriteNodeMaterial, SpriteSheetUVNode, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StackNode, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StorageArrayElementNode, StorageBufferAttribute, StorageBufferNode, StorageInstancedBufferAttribute, StorageTexture, StorageTextureNode, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TBNViewMatrix, TOUCH, TangentSpaceNormalMap, TempNode, TetrahedronGeometry, Texture, Texture3DNode, TextureBicubicNode, TextureLoader, TextureNode, TextureSizeNode, TimerNode, ToneMappingNode, TorusGeometry, TorusKnotGeometry, TransitionNode, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TriplanarTexturesNode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform$1 as Uniform, UniformArrayNode, UniformGroupNode, UniformNode, UniformsGroup$1 as UniformsGroup, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, UserDataNode, VSMShadowMap, V_GGX_SmithCorrelated, VarNode, VaryingNode, Vector2, Vector3, Vector4, VectorKeyframeTrack, VertexColorNode, VideoTexture, ViewportDepthNode, ViewportDepthTextureNode, ViewportNode, ViewportSharedTextureNode, ViewportTextureNode, VolumeNodeMaterial, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget, WebGPUCoordinateSystem, WebGPURenderer, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, abs, acos, add, addLightNode, addNodeClass, addNodeElement, addNodeMaterial, afterImage, all, alphaT, anamorphic, and, anisotropy, anisotropyB, anisotropyT, any, ao, append, arrayBuffer, asin, assign, atan, atan2, attribute, backgroundBlurriness, backgroundIntensity, batch, billboarding, bitAnd, bitNot, bitOr, bitXor, bitangentGeometry, bitangentLocal, bitangentView, bitangentWorld, bitcast, bleach, bloom, blur, bmat2, bmat3, bmat4, bool, buffer, bufferAttribute, bumpMap, burn, bvec2, bvec3, bvec4, bypass, cache, call, cameraFar, cameraLogDepth, cameraNear, cameraNormalMatrix, cameraPosition, cameraProjectionMatrix, cameraProjectionMatrixInverse, cameraViewMatrix, cameraWorldMatrix, cbrt, ceil, checker, clamp, clearcoat, clearcoatRoughness, code, color, colorSpaceToLinear, colorToDirection, compute, cond, context, convert, cos, createCanvasElement, createNodeFromType, createNodeMaterialFromType, cross, cubeTexture, dFdx, dFdy, dashSize, defaultBuildStages, defaultShaderStages, defined, degrees, denoise, densityFog, depth, depthPass, difference, diffuseColor, directionToColor, discard, distance, div, dodge, dof, dot, dotScreen, drawIndex, dynamicBufferAttribute, element, emissive, equal, equals, equirectUV, exp, exp2, expression, faceDirection, faceForward, film, float, floor, fog, fract, frameGroup, frameId, frontFacing, fwidth, fxaa, gain, gapSize, gaussianBlur, getConstNodeType, getCurrentStack, getDirection, getDistanceAttenuation, getGeometryRoughness, getRoughness, global, glsl, glslFn, greaterThan, greaterThanEqual, hash, hue, imat2, imat3, imat4, instance, instanceIndex, instancedBufferAttribute, instancedDynamicBufferAttribute, int, inverseSqrt, iridescence, iridescenceIOR, iridescenceThickness, ivec2, ivec3, ivec4, js, label, length, lengthSq, lessThan, lessThanEqual, lightTargetDirection, lightingContext, lights, lightsNode, linearDepth, linearToColorSpace, linearTosRGB, log, log2, loop, luminance, lut3D, mat2, mat3, mat4, matcapUV, materialAOMap, materialAlphaTest, materialAnisotropy, materialAnisotropyVector, materialClearcoat, materialClearcoatNormal, materialClearcoatRoughness, materialColor, materialDispersion, materialEmissive, materialIridescence, materialIridescenceIOR, materialIridescenceThickness, materialLightMap, materialLineDashOffset, materialLineDashSize, materialLineGapSize, materialLineScale, materialLineWidth, materialMetalness, materialNormal, materialOpacity, materialPointWidth, materialReference, materialReflectivity, materialRefractionRatio, materialRotation, materialRoughness, materialSheen, materialSheenRoughness, materialShininess, materialSpecular, materialSpecularStrength, max$1 as max, maxMipLevel, metalness, min$1 as min, mix, mod, modelDirection, modelNormalMatrix, modelPosition, modelScale, modelViewMatrix, modelViewPosition, modelViewProjection, modelWorldMatrix, modelWorldMatrixInverse, morphReference, mrt, mul, mx_aastep, mx_cell_noise_float, mx_contrast, mx_fractal_noise_float, mx_fractal_noise_vec2, mx_fractal_noise_vec3, mx_fractal_noise_vec4, mx_hsvtorgb, mx_noise_float, mx_noise_vec3, mx_noise_vec4, mx_ramplr, mx_ramptb, mx_rgbtohsv, mx_safepower, mx_splitlr, mx_splittb, mx_srgb_texture_to_lin_rec709, mx_transform_uv, mx_worley_noise_float, mx_worley_noise_vec2, mx_worley_noise_vec3, negate, nodeArray, nodeImmutable, nodeObject, nodeObjects, nodeProxy, normalGeometry, normalLocal, normalMap, normalView, normalWorld, normalize, not, objectDirection, objectGroup, objectNormalMatrix, objectPosition, objectScale, objectViewMatrix, objectViewPosition, objectWorldMatrix, oneMinus, or, orthographicDepthToViewZ, oscSawtooth, oscSine, oscSquare, oscTriangle, output, outputStruct, overlay, overloadingFn, parabola, parallaxDirection, parallaxUV, parameter, pass, passTexture, pcurve, perspectiveDepthToViewZ, pixelationPass, pmremTexture, pointUV, pointWidth, positionGeometry, positionLocal, positionView, positionViewDirection, positionWorld, positionWorldDirection, posterize, pow, pow2, pow3, pow4, property, radians, rand, range, rangeFog, reciprocal, reference, referenceBuffer, reflect, reflectVector, reflectView, reflector, refract, refractVector, refractView, remainder, remap, remapClamp, renderGroup, renderOutput, rendererReference, rgbShift, rotate, rotateUV, roughness, round, rtt, sRGBToLinear, sampler, saturate, saturation, screen, scriptable, scriptableValue, sepia, setCurrentStack, shaderStages, sheen, sheenRoughness, shiftLeft, shiftRight, shininess, sign, sin, sinc, skinning, skinningReference, smoothstep, sobel, specularColor, spherizeUV, split, spritesheetUV, sqrt, stack, step, storage, storageObject, storageTexture, string, sub, tan, tangentGeometry, tangentLocal, tangentView, tangentWorld, temp, texture, texture3D, textureBicubic, textureCubeUV, textureLoad, textureSize, textureStore, threshold, timerDelta, timerGlobal, timerLocal, toneMapping, transformDirection, transformedBentNormalView, transformedBitangentView, transformedBitangentWorld, transformedClearcoatNormalView, transformedNormalView, transformedNormalWorld, transformedTangentView, transformedTangentWorld, transition, transpose, triNoise3D, triplanarTexture, triplanarTextures, trunc, tslFn, uint, umat2, umat3, umat4, uniform, uniformArray, uniformGroup, userData, uv, uvec2, uvec3, uvec4, varying, varyingProperty, vec2, vec3, vec4, vectorComponents, vertexColor, vertexIndex, vibrance, viewZToOrthographicDepth, viewZToPerspectiveDepth, viewport, viewportBottomLeft, viewportBottomRight, viewportCoordinate, viewportDepthTexture, viewportLinearDepth, viewportMipTexture, viewportResolution, viewportSafeUV, viewportSharedTexture, viewportTexture, viewportTopLeft, viewportTopRight, wgsl, wgslFn, xor };
76437
+ export { ACESFilmicToneMapping, AONode, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AfterImageNode, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightNode, AnalyticLightNode, AnamorphicNode, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrayElementNode, ArrowHelper, AssignNode, AttachedBindMode, AttributeNode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BRDF_GGX, BRDF_Lambert, BackSide, BasicDepthPacking, BasicEnvironmentNode, BasicShadowMap$1 as BasicShadowMap, BatchNode, BatchedMesh, BlendModeNode, BloomNode, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, Break, BufferAttribute, BufferAttributeNode, BufferGeometry, BufferGeometryLoader, BufferNode, BumpMapNode, BypassNode, ByteType, Cache, CacheNode, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CheckerNode, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, CodeNode, Color, ColorAdjustmentNode, ColorKeyframeTrack, ColorManagement, ColorSpaceNode, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ComputeNode, CondNode, ConeGeometry, ConstNode, ConstantAlphaFactor, ConstantColorFactor, ContextNode, Continue, ConvertNode, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeTextureNode, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, DFGApprox, D_GGX, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DenoiseNode, DepthFormat, DepthOfFieldNode, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DirectionalLightNode, DiscardNode, DiscreteInterpolant, DisplayP3ColorSpace, DodecahedronGeometry, DotScreenNode, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EPSILON, EdgesGeometry, EllipseCurve, EnvironmentNode, EqualCompare, EqualDepth, EqualStencilFunc, EquirectUVNode, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExpressionNode, ExtrudeGeometry, FXAANode, F_Schlick, FileLoader, FilmNode, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fn, Fog, FogExp2, FogExp2Node, FogNode, FogRangeNode, FramebufferTexture, FrontFacingNode, FrontSide, Frustum, FunctionCallNode, FunctionNode, FunctionOverloadingNode, GLBufferAttribute, GLSL1, GLSL3, GLSLNodeParser, GTAONode, GaussianBlurNode, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HashNode, HemisphereLight, HemisphereLightHelper, HemisphereLightNode, IESSpotLight, IESSpotLightNode, INFINITY, IcosahedronGeometry, If, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, IndexNode, InstanceNode, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, InstancedPointsNodeMaterial, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, IrradianceNode, JoinNode, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightNode, LightProbe, LightingContextNode, LightingModel, LightingNode, LightsNode, Line, Line2NodeMaterial, Line3, LineBasicMaterial, LineBasicNodeMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineDashedNodeMaterial, LineLoop, LineSegments, LinearDisplayP3ColorSpace, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, Loop, LoopNode, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, Lut3DNode, MOUSE, MRTNode, MatcapUVNode, Material, MaterialLoader, MaterialNode, MaterialReferenceNode, MathNode, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, MaxMipLevelNode, Mesh, MeshBasicMaterial, MeshBasicNodeMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshLambertNodeMaterial, MeshMatcapMaterial, MeshMatcapNodeMaterial, MeshNormalMaterial, MeshNormalNodeMaterial, MeshPhongMaterial, MeshPhongNodeMaterial, MeshPhysicalMaterial, MeshPhysicalNodeMaterial, MeshSSSNodeMaterial, MeshStandardMaterial, MeshStandardNodeMaterial, MeshToonMaterial, MeshToonNodeMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, ModelNode, ModelViewProjectionNode, MorphNode, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, Node, NodeAttribute, NodeBuilder, NodeCache, NodeCode, NodeFrame, NodeFunctionInput, NodeKeywords, NodeLoader, NodeMaterial, NodeMaterialLoader, NodeObjectLoader, NodeShaderStage, NodeType, NodeUniform, NodeUpdateType, NodeUtils, NodeVar, NodeVarying, NormalAnimationBlendMode, NormalBlending, NormalMapNode, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, Object3DNode, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OperatorNode, OrthographicCamera, OscNode, OutputStructNode, P3Primaries, PCFShadowMap$1 as PCFShadowMap, PCFSoftShadowMap$1 as PCFSoftShadowMap, PI, PI2, PMREMGenerator, PMREMNode, PackingNode, ParameterNode, PassNode, Path, PerspectiveCamera, PhongLightingModel, PhysicalLightingModel, PixelationPassNode, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, PointLightNode, PointUVNode, Points, PointsMaterial, PointsNodeMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PostProcessing, PosterizeNode, PropertyBinding, PropertyMixer, PropertyNode, QuadMesh, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDepthPacking, RGBFormat, RGBIntegerFormat, RGBShiftNode, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGDepthPacking, RGFormat, RGIntegerFormat, RTTNode, RangeNode, RawShaderMaterial, Ray, Raycaster, Rec709Primaries, RectAreaLight, RectAreaLightNode, RedFormat, RedIntegerFormat, ReferenceNode, ReflectorNode, ReinhardToneMapping, RemapNode, RenderOutputNode, RenderTarget, RendererReferenceNode, RepeatWrapping, ReplaceStencilOp, Return, ReverseSubtractEquation, RingGeometry, RotateNode, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, SceneNode, Schlick_to_F0, ScriptableNode, ScriptableValueNode, SetNode, ShaderMaterial, ShaderNode, ShadowMaterial, ShadowNodeMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, SkinningNode, SobelOperatorNode, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SplitNode, SpotLight, SpotLightHelper, SpotLightNode, Sprite, SpriteMaterial, SpriteNodeMaterial, SpriteSheetUVNode, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StackNode, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StorageArrayElementNode, StorageBufferAttribute, StorageBufferNode, StorageInstancedBufferAttribute, StorageTexture, StorageTextureNode, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TBNViewMatrix, TOUCH, TangentSpaceNormalMap, TempNode, TetrahedronGeometry, Texture, Texture3DNode, TextureBicubicNode, TextureLoader, TextureNode, TextureSizeNode, TimerNode, ToneMappingNode, TorusGeometry, TorusKnotGeometry, TransitionNode, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TriplanarTexturesNode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform$1 as Uniform, UniformArrayNode, UniformGroupNode, UniformNode, UniformsGroup$1 as UniformsGroup, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, UserDataNode, VSMShadowMap, V_GGX_SmithCorrelated, VarNode, VaryingNode, Vector2, Vector3, Vector4, VectorKeyframeTrack, VertexColorNode, VideoTexture, ViewportDepthNode, ViewportDepthTextureNode, ViewportNode, ViewportSharedTextureNode, ViewportTextureNode, VolumeNodeMaterial, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget, WebGPUCoordinateSystem, WebGPURenderer, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, abs, acos, add, addLightNode, addNodeClass, addNodeElement, addNodeMaterial, afterImage, all, alphaT, anamorphic, and, anisotropy, anisotropyB, anisotropyT, any, ao, append, arrayBuffer, asin, assign, atan, atan2, attribute, backgroundBlurriness, backgroundIntensity, batch, billboarding, bitAnd, bitNot, bitOr, bitXor, bitangentGeometry, bitangentLocal, bitangentView, bitangentWorld, bitcast, bleach, bloom, blur, bmat2, bmat3, bmat4, bool, buffer, bufferAttribute, bumpMap, burn, bvec2, bvec3, bvec4, bypass, cache, call, cameraFar, cameraLogDepth, cameraNear, cameraNormalMatrix, cameraPosition, cameraProjectionMatrix, cameraProjectionMatrixInverse, cameraViewMatrix, cameraWorldMatrix, cbrt, ceil, checker, clamp, clearcoat, clearcoatRoughness, code, color, colorSpaceToLinear, colorToDirection, compute, cond, context, convert, cos, createCanvasElement, createNodeFromType, createNodeMaterialFromType, cross, cubeTexture, dFdx, dFdy, dashSize, defaultBuildStages, defaultShaderStages, defined, degrees, denoise, densityFog, depth, depthPass, difference, diffuseColor, directionToColor, discard, distance, div, dodge, dof, dot, dotScreen, drawIndex, dynamicBufferAttribute, element, emissive, equal, equals, equirectUV, exp, exp2, expression, faceDirection, faceForward, film, float, floor, fog, fract, frameGroup, frameId, frontFacing, fwidth, fxaa, gain, gapSize, gaussianBlur, getConstNodeType, getCurrentStack, getDirection, getDistanceAttenuation, getGeometryRoughness, getRoughness, global, glsl, glslFn, greaterThan, greaterThanEqual, hash, hue, imat2, imat3, imat4, instance, instanceIndex, instancedBufferAttribute, instancedDynamicBufferAttribute, int, inverseSqrt, iridescence, iridescenceIOR, iridescenceThickness, ivec2, ivec3, ivec4, js, label, length, lengthSq, lessThan, lessThanEqual, lightTargetDirection, lightingContext, lights, lightsNode, linearDepth, linearToColorSpace, linearTosRGB, log, log2, luminance, lut3D, mat2, mat3, mat4, matcapUV, materialAOMap, materialAlphaTest, materialAnisotropy, materialAnisotropyVector, materialClearcoat, materialClearcoatNormal, materialClearcoatRoughness, materialColor, materialDispersion, materialEmissive, materialIridescence, materialIridescenceIOR, materialIridescenceThickness, materialLightMap, materialLineDashOffset, materialLineDashSize, materialLineGapSize, materialLineScale, materialLineWidth, materialMetalness, materialNormal, materialOpacity, materialPointWidth, materialReference, materialReflectivity, materialRefractionRatio, materialRotation, materialRoughness, materialSheen, materialSheenRoughness, materialShininess, materialSpecular, materialSpecularStrength, max$1 as max, maxMipLevel, metalness, min$1 as min, mix, mod, modelDirection, modelNormalMatrix, modelPosition, modelScale, modelViewMatrix, modelViewPosition, modelViewProjection, modelWorldMatrix, modelWorldMatrixInverse, morphReference, mrt, mul, mx_aastep, mx_cell_noise_float, mx_contrast, mx_fractal_noise_float, mx_fractal_noise_vec2, mx_fractal_noise_vec3, mx_fractal_noise_vec4, mx_hsvtorgb, mx_noise_float, mx_noise_vec3, mx_noise_vec4, mx_ramplr, mx_ramptb, mx_rgbtohsv, mx_safepower, mx_splitlr, mx_splittb, mx_srgb_texture_to_lin_rec709, mx_transform_uv, mx_worley_noise_float, mx_worley_noise_vec2, mx_worley_noise_vec3, negate, nodeArray, nodeImmutable, nodeObject, nodeObjects, nodeProxy, normalGeometry, normalLocal, normalMap, normalView, normalWorld, normalize, not, objectDirection, objectGroup, objectNormalMatrix, objectPosition, objectScale, objectViewMatrix, objectViewPosition, objectWorldMatrix, oneMinus, or, orthographicDepthToViewZ, oscSawtooth, oscSine, oscSquare, oscTriangle, output, outputStruct, overlay, overloadingFn, parabola, parallaxDirection, parallaxUV, parameter, pass, passTexture, pcurve, perspectiveDepthToViewZ, pixelationPass, pmremTexture, pointUV, pointWidth, positionGeometry, positionLocal, positionView, positionViewDirection, positionWorld, positionWorldDirection, posterize, pow, pow2, pow3, pow4, property, radians, rand, range, rangeFog, reciprocal, reference, referenceBuffer, reflect, reflectVector, reflectView, reflector, refract, refractVector, refractView, remainder, remap, remapClamp, renderGroup, renderOutput, rendererReference, rgbShift, rotate, rotateUV, roughness, round, rtt, sRGBToLinear, sampler, saturate, saturation, screen, scriptable, scriptableValue, select, sepia, setCurrentStack, shaderStages, sheen, sheenRoughness, shiftLeft, shiftRight, shininess, sign, sin, sinc, skinning, skinningReference, smoothstep, sobel, specularColor, spherizeUV, split, spritesheetUV, sqrt, stack, step, storage, storageObject, storageTexture, string, sub, tan, tangentGeometry, tangentLocal, tangentView, tangentWorld, temp, texture, texture3D, textureBicubic, textureCubeUV, textureLoad, textureSize, textureStore, threshold, timerDelta, timerGlobal, timerLocal, toneMapping, transformDirection, transformedBentNormalView, transformedBitangentView, transformedBitangentWorld, transformedClearcoatNormalView, transformedNormalView, transformedNormalWorld, transformedTangentView, transformedTangentWorld, transition, transpose, triNoise3D, triplanarTexture, triplanarTextures, trunc, tslFn, uint, umat2, umat3, umat4, uniform, uniformArray, uniformGroup, userData, uv, uvec2, uvec3, uvec4, varying, varyingProperty, vec2, vec3, vec4, vectorComponents, vertexColor, vertexIndex, vibrance, viewZToOrthographicDepth, viewZToPerspectiveDepth, viewport, viewportBottomLeft, viewportBottomRight, viewportCoordinate, viewportDepthTexture, viewportLinearDepth, viewportMipTexture, viewportResolution, viewportSafeUV, viewportSharedTexture, viewportTexture, viewportTopLeft, viewportTopRight, wgsl, wgslFn, xor };