three.tsl.js 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. /**
  2. * @license
  3. * Copyright 2010-2025 Three.js Authors
  4. * SPDX-License-Identifier: MIT
  5. */
  6. import { TSL } from 'three/webgpu';
  7. const BRDF_GGX = TSL.BRDF_GGX;
  8. const BRDF_Lambert = TSL.BRDF_Lambert;
  9. const BasicPointShadowFilter = TSL.BasicPointShadowFilter;
  10. const BasicShadowFilter = TSL.BasicShadowFilter;
  11. const Break = TSL.Break;
  12. const Const = TSL.Const;
  13. const Continue = TSL.Continue;
  14. const DFGLUT = TSL.DFGLUT;
  15. const D_GGX = TSL.D_GGX;
  16. const Discard = TSL.Discard;
  17. const EPSILON = TSL.EPSILON;
  18. const F_Schlick = TSL.F_Schlick;
  19. const Fn = TSL.Fn;
  20. const INFINITY = TSL.INFINITY;
  21. const If = TSL.If;
  22. const Loop = TSL.Loop;
  23. const NodeAccess = TSL.NodeAccess;
  24. const NodeShaderStage = TSL.NodeShaderStage;
  25. const NodeType = TSL.NodeType;
  26. const NodeUpdateType = TSL.NodeUpdateType;
  27. const PCFShadowFilter = TSL.PCFShadowFilter;
  28. const PCFSoftShadowFilter = TSL.PCFSoftShadowFilter;
  29. const PI = TSL.PI;
  30. const PI2 = TSL.PI2;
  31. const TWO_PI = TSL.TWO_PI;
  32. const HALF_PI = TSL.HALF_PI;
  33. const PointShadowFilter = TSL.PointShadowFilter;
  34. const Return = TSL.Return;
  35. const Schlick_to_F0 = TSL.Schlick_to_F0;
  36. const ScriptableNodeResources = TSL.ScriptableNodeResources;
  37. const ShaderNode = TSL.ShaderNode;
  38. const Stack = TSL.Stack;
  39. const Switch = TSL.Switch;
  40. const TBNViewMatrix = TSL.TBNViewMatrix;
  41. const VSMShadowFilter = TSL.VSMShadowFilter;
  42. const V_GGX_SmithCorrelated = TSL.V_GGX_SmithCorrelated;
  43. const Var = TSL.Var;
  44. const VarIntent = TSL.VarIntent;
  45. const abs = TSL.abs;
  46. const acesFilmicToneMapping = TSL.acesFilmicToneMapping;
  47. const acos = TSL.acos;
  48. const add = TSL.add;
  49. const addMethodChaining = TSL.addMethodChaining;
  50. const addNodeElement = TSL.addNodeElement;
  51. const agxToneMapping = TSL.agxToneMapping;
  52. const all = TSL.all;
  53. const alphaT = TSL.alphaT;
  54. const and = TSL.and;
  55. const anisotropy = TSL.anisotropy;
  56. const anisotropyB = TSL.anisotropyB;
  57. const anisotropyT = TSL.anisotropyT;
  58. const any = TSL.any;
  59. const append = TSL.append;
  60. const array = TSL.array;
  61. const arrayBuffer = TSL.arrayBuffer;
  62. const asin = TSL.asin;
  63. const assign = TSL.assign;
  64. const atan = TSL.atan;
  65. const atomicAdd = TSL.atomicAdd;
  66. const atomicAnd = TSL.atomicAnd;
  67. const atomicFunc = TSL.atomicFunc;
  68. const atomicLoad = TSL.atomicLoad;
  69. const atomicMax = TSL.atomicMax;
  70. const atomicMin = TSL.atomicMin;
  71. const atomicOr = TSL.atomicOr;
  72. const atomicStore = TSL.atomicStore;
  73. const atomicSub = TSL.atomicSub;
  74. const atomicXor = TSL.atomicXor;
  75. const attenuationColor = TSL.attenuationColor;
  76. const attenuationDistance = TSL.attenuationDistance;
  77. const attribute = TSL.attribute;
  78. const attributeArray = TSL.attributeArray;
  79. const backgroundBlurriness = TSL.backgroundBlurriness;
  80. const backgroundIntensity = TSL.backgroundIntensity;
  81. const backgroundRotation = TSL.backgroundRotation;
  82. const batch = TSL.batch;
  83. const bentNormalView = TSL.bentNormalView;
  84. const billboarding = TSL.billboarding;
  85. const bitAnd = TSL.bitAnd;
  86. const bitNot = TSL.bitNot;
  87. const bitOr = TSL.bitOr;
  88. const bitXor = TSL.bitXor;
  89. const bitangentGeometry = TSL.bitangentGeometry;
  90. const bitangentLocal = TSL.bitangentLocal;
  91. const bitangentView = TSL.bitangentView;
  92. const bitangentWorld = TSL.bitangentWorld;
  93. const bitcast = TSL.bitcast;
  94. const blendBurn = TSL.blendBurn;
  95. const blendColor = TSL.blendColor;
  96. const blendDodge = TSL.blendDodge;
  97. const blendOverlay = TSL.blendOverlay;
  98. const blendScreen = TSL.blendScreen;
  99. const blur = TSL.blur;
  100. const bool = TSL.bool;
  101. const buffer = TSL.buffer;
  102. const bufferAttribute = TSL.bufferAttribute;
  103. const bumpMap = TSL.bumpMap;
  104. const builtin = TSL.builtin;
  105. const builtinAOContext = TSL.builtinAOContext;
  106. const builtinShadowContext = TSL.builtinShadowContext;
  107. const bvec2 = TSL.bvec2;
  108. const bvec3 = TSL.bvec3;
  109. const bvec4 = TSL.bvec4;
  110. const bypass = TSL.bypass;
  111. const cache = TSL.cache;
  112. const call = TSL.call;
  113. const cameraFar = TSL.cameraFar;
  114. const cameraIndex = TSL.cameraIndex;
  115. const cameraNear = TSL.cameraNear;
  116. const cameraNormalMatrix = TSL.cameraNormalMatrix;
  117. const cameraPosition = TSL.cameraPosition;
  118. const cameraProjectionMatrix = TSL.cameraProjectionMatrix;
  119. const cameraProjectionMatrixInverse = TSL.cameraProjectionMatrixInverse;
  120. const cameraViewMatrix = TSL.cameraViewMatrix;
  121. const cameraViewport = TSL.cameraViewport;
  122. const cameraWorldMatrix = TSL.cameraWorldMatrix;
  123. const cbrt = TSL.cbrt;
  124. const cdl = TSL.cdl;
  125. const ceil = TSL.ceil;
  126. const checker = TSL.checker;
  127. const cineonToneMapping = TSL.cineonToneMapping;
  128. const clamp = TSL.clamp;
  129. const clearcoat = TSL.clearcoat;
  130. const clearcoatNormalView = TSL.clearcoatNormalView;
  131. const clearcoatRoughness = TSL.clearcoatRoughness;
  132. const clipSpace = TSL.clipSpace;
  133. const code = TSL.code;
  134. const color = TSL.color;
  135. const colorSpaceToWorking = TSL.colorSpaceToWorking;
  136. const colorToDirection = TSL.colorToDirection;
  137. const compute = TSL.compute;
  138. const computeKernel = TSL.computeKernel;
  139. const computeSkinning = TSL.computeSkinning;
  140. const context = TSL.context;
  141. const convert = TSL.convert;
  142. const convertColorSpace = TSL.convertColorSpace;
  143. const convertToTexture = TSL.convertToTexture;
  144. const countLeadingZeros = TSL.countLeadingZeros;
  145. const countOneBits = TSL.countOneBits;
  146. const countTrailingZeros = TSL.countTrailingZeros;
  147. const cos = TSL.cos;
  148. const cross = TSL.cross;
  149. const cubeTexture = TSL.cubeTexture;
  150. const cubeTextureBase = TSL.cubeTextureBase;
  151. const dFdx = TSL.dFdx;
  152. const dFdy = TSL.dFdy;
  153. const dashSize = TSL.dashSize;
  154. const debug = TSL.debug;
  155. const decrement = TSL.decrement;
  156. const decrementBefore = TSL.decrementBefore;
  157. const defaultBuildStages = TSL.defaultBuildStages;
  158. const defaultShaderStages = TSL.defaultShaderStages;
  159. const defined = TSL.defined;
  160. const degrees = TSL.degrees;
  161. const deltaTime = TSL.deltaTime;
  162. const densityFog = TSL.densityFog;
  163. const densityFogFactor = TSL.densityFogFactor;
  164. const depth = TSL.depth;
  165. const depthPass = TSL.depthPass;
  166. const determinant = TSL.determinant;
  167. const difference = TSL.difference;
  168. const diffuseColor = TSL.diffuseColor;
  169. const directPointLight = TSL.directPointLight;
  170. const directionToColor = TSL.directionToColor;
  171. const directionToFaceDirection = TSL.directionToFaceDirection;
  172. const dispersion = TSL.dispersion;
  173. const distance = TSL.distance;
  174. const div = TSL.div;
  175. const dot = TSL.dot;
  176. const drawIndex = TSL.drawIndex;
  177. const dynamicBufferAttribute = TSL.dynamicBufferAttribute;
  178. const element = TSL.element;
  179. const emissive = TSL.emissive;
  180. const equal = TSL.equal;
  181. const equirectUV = TSL.equirectUV;
  182. const exp = TSL.exp;
  183. const exp2 = TSL.exp2;
  184. const exponentialHeightFogFactor = TSL.exponentialHeightFogFactor;
  185. const expression = TSL.expression;
  186. const faceDirection = TSL.faceDirection;
  187. const faceForward = TSL.faceForward;
  188. const faceforward = TSL.faceforward;
  189. const float = TSL.float;
  190. const floatBitsToInt = TSL.floatBitsToInt;
  191. const floatBitsToUint = TSL.floatBitsToUint;
  192. const floor = TSL.floor;
  193. const fog = TSL.fog;
  194. const fract = TSL.fract;
  195. const frameGroup = TSL.frameGroup;
  196. const frameId = TSL.frameId;
  197. const frontFacing = TSL.frontFacing;
  198. const fwidth = TSL.fwidth;
  199. const gain = TSL.gain;
  200. const gapSize = TSL.gapSize;
  201. const getConstNodeType = TSL.getConstNodeType;
  202. const getCurrentStack = TSL.getCurrentStack;
  203. const getDirection = TSL.getDirection;
  204. const getDistanceAttenuation = TSL.getDistanceAttenuation;
  205. const getGeometryRoughness = TSL.getGeometryRoughness;
  206. const getNormalFromDepth = TSL.getNormalFromDepth;
  207. const interleavedGradientNoise = TSL.interleavedGradientNoise;
  208. const vogelDiskSample = TSL.vogelDiskSample;
  209. const getParallaxCorrectNormal = TSL.getParallaxCorrectNormal;
  210. const getRoughness = TSL.getRoughness;
  211. const getScreenPosition = TSL.getScreenPosition;
  212. const getShIrradianceAt = TSL.getShIrradianceAt;
  213. const getShadowMaterial = TSL.getShadowMaterial;
  214. const getShadowRenderObjectFunction = TSL.getShadowRenderObjectFunction;
  215. const getTextureIndex = TSL.getTextureIndex;
  216. const getViewPosition = TSL.getViewPosition;
  217. const globalId = TSL.globalId;
  218. const glsl = TSL.glsl;
  219. const glslFn = TSL.glslFn;
  220. const grayscale = TSL.grayscale;
  221. const greaterThan = TSL.greaterThan;
  222. const greaterThanEqual = TSL.greaterThanEqual;
  223. const hash = TSL.hash;
  224. const highpModelNormalViewMatrix = TSL.highpModelNormalViewMatrix;
  225. const highpModelViewMatrix = TSL.highpModelViewMatrix;
  226. const hue = TSL.hue;
  227. const increment = TSL.increment;
  228. const incrementBefore = TSL.incrementBefore;
  229. const instance = TSL.instance;
  230. const instanceIndex = TSL.instanceIndex;
  231. const instancedArray = TSL.instancedArray;
  232. const instancedBufferAttribute = TSL.instancedBufferAttribute;
  233. const instancedDynamicBufferAttribute = TSL.instancedDynamicBufferAttribute;
  234. const instancedMesh = TSL.instancedMesh;
  235. const int = TSL.int;
  236. const intBitsToFloat = TSL.intBitsToFloat;
  237. const inverse = TSL.inverse;
  238. const inverseSqrt = TSL.inverseSqrt;
  239. const inversesqrt = TSL.inversesqrt;
  240. const invocationLocalIndex = TSL.invocationLocalIndex;
  241. const invocationSubgroupIndex = TSL.invocationSubgroupIndex;
  242. const ior = TSL.ior;
  243. const iridescence = TSL.iridescence;
  244. const iridescenceIOR = TSL.iridescenceIOR;
  245. const iridescenceThickness = TSL.iridescenceThickness;
  246. const ivec2 = TSL.ivec2;
  247. const ivec3 = TSL.ivec3;
  248. const ivec4 = TSL.ivec4;
  249. const js = TSL.js;
  250. const label = TSL.label;
  251. const length = TSL.length;
  252. const lengthSq = TSL.lengthSq;
  253. const lessThan = TSL.lessThan;
  254. const lessThanEqual = TSL.lessThanEqual;
  255. const lightPosition = TSL.lightPosition;
  256. const lightProjectionUV = TSL.lightProjectionUV;
  257. const lightShadowMatrix = TSL.lightShadowMatrix;
  258. const lightTargetDirection = TSL.lightTargetDirection;
  259. const lightTargetPosition = TSL.lightTargetPosition;
  260. const lightViewPosition = TSL.lightViewPosition;
  261. const lightingContext = TSL.lightingContext;
  262. const lights = TSL.lights;
  263. const linearDepth = TSL.linearDepth;
  264. const linearToneMapping = TSL.linearToneMapping;
  265. const localId = TSL.localId;
  266. const log = TSL.log;
  267. const log2 = TSL.log2;
  268. const logarithmicDepthToViewZ = TSL.logarithmicDepthToViewZ;
  269. const luminance = TSL.luminance;
  270. const mat2 = TSL.mat2;
  271. const mat3 = TSL.mat3;
  272. const mat4 = TSL.mat4;
  273. const matcapUV = TSL.matcapUV;
  274. const materialAO = TSL.materialAO;
  275. const materialAlphaTest = TSL.materialAlphaTest;
  276. const materialAnisotropy = TSL.materialAnisotropy;
  277. const materialAnisotropyVector = TSL.materialAnisotropyVector;
  278. const materialAttenuationColor = TSL.materialAttenuationColor;
  279. const materialAttenuationDistance = TSL.materialAttenuationDistance;
  280. const materialClearcoat = TSL.materialClearcoat;
  281. const materialClearcoatNormal = TSL.materialClearcoatNormal;
  282. const materialClearcoatRoughness = TSL.materialClearcoatRoughness;
  283. const materialColor = TSL.materialColor;
  284. const materialDispersion = TSL.materialDispersion;
  285. const materialEmissive = TSL.materialEmissive;
  286. const materialEnvIntensity = TSL.materialEnvIntensity;
  287. const materialEnvRotation = TSL.materialEnvRotation;
  288. const materialIOR = TSL.materialIOR;
  289. const materialIridescence = TSL.materialIridescence;
  290. const materialIridescenceIOR = TSL.materialIridescenceIOR;
  291. const materialIridescenceThickness = TSL.materialIridescenceThickness;
  292. const materialLightMap = TSL.materialLightMap;
  293. const materialLineDashOffset = TSL.materialLineDashOffset;
  294. const materialLineDashSize = TSL.materialLineDashSize;
  295. const materialLineGapSize = TSL.materialLineGapSize;
  296. const materialLineScale = TSL.materialLineScale;
  297. const materialLineWidth = TSL.materialLineWidth;
  298. const materialMetalness = TSL.materialMetalness;
  299. const materialNormal = TSL.materialNormal;
  300. const materialOpacity = TSL.materialOpacity;
  301. const materialPointSize = TSL.materialPointSize;
  302. const materialReference = TSL.materialReference;
  303. const materialReflectivity = TSL.materialReflectivity;
  304. const materialRefractionRatio = TSL.materialRefractionRatio;
  305. const materialRotation = TSL.materialRotation;
  306. const materialRoughness = TSL.materialRoughness;
  307. const materialSheen = TSL.materialSheen;
  308. const materialSheenRoughness = TSL.materialSheenRoughness;
  309. const materialShininess = TSL.materialShininess;
  310. const materialSpecular = TSL.materialSpecular;
  311. const materialSpecularColor = TSL.materialSpecularColor;
  312. const materialSpecularIntensity = TSL.materialSpecularIntensity;
  313. const materialSpecularStrength = TSL.materialSpecularStrength;
  314. const materialThickness = TSL.materialThickness;
  315. const materialTransmission = TSL.materialTransmission;
  316. const max = TSL.max;
  317. const maxMipLevel = TSL.maxMipLevel;
  318. const mediumpModelViewMatrix = TSL.mediumpModelViewMatrix;
  319. const metalness = TSL.metalness;
  320. const min = TSL.min;
  321. const mix = TSL.mix;
  322. const mixElement = TSL.mixElement;
  323. const mod = TSL.mod;
  324. const modInt = TSL.modInt;
  325. const modelDirection = TSL.modelDirection;
  326. const modelNormalMatrix = TSL.modelNormalMatrix;
  327. const modelPosition = TSL.modelPosition;
  328. const modelRadius = TSL.modelRadius;
  329. const modelScale = TSL.modelScale;
  330. const modelViewMatrix = TSL.modelViewMatrix;
  331. const modelViewPosition = TSL.modelViewPosition;
  332. const modelViewProjection = TSL.modelViewProjection;
  333. const modelWorldMatrix = TSL.modelWorldMatrix;
  334. const modelWorldMatrixInverse = TSL.modelWorldMatrixInverse;
  335. const morphReference = TSL.morphReference;
  336. const mrt = TSL.mrt;
  337. const mul = TSL.mul;
  338. const mx_aastep = TSL.mx_aastep;
  339. const mx_add = TSL.mx_add;
  340. const mx_atan2 = TSL.mx_atan2;
  341. const mx_cell_noise_float = TSL.mx_cell_noise_float;
  342. const mx_contrast = TSL.mx_contrast;
  343. const mx_divide = TSL.mx_divide;
  344. const mx_fractal_noise_float = TSL.mx_fractal_noise_float;
  345. const mx_fractal_noise_vec2 = TSL.mx_fractal_noise_vec2;
  346. const mx_fractal_noise_vec3 = TSL.mx_fractal_noise_vec3;
  347. const mx_fractal_noise_vec4 = TSL.mx_fractal_noise_vec4;
  348. const mx_frame = TSL.mx_frame;
  349. const mx_heighttonormal = TSL.mx_heighttonormal;
  350. const mx_hsvtorgb = TSL.mx_hsvtorgb;
  351. const mx_ifequal = TSL.mx_ifequal;
  352. const mx_ifgreater = TSL.mx_ifgreater;
  353. const mx_ifgreatereq = TSL.mx_ifgreatereq;
  354. const mx_invert = TSL.mx_invert;
  355. const mx_modulo = TSL.mx_modulo;
  356. const mx_multiply = TSL.mx_multiply;
  357. const mx_noise_float = TSL.mx_noise_float;
  358. const mx_noise_vec3 = TSL.mx_noise_vec3;
  359. const mx_noise_vec4 = TSL.mx_noise_vec4;
  360. const mx_place2d = TSL.mx_place2d;
  361. const mx_power = TSL.mx_power;
  362. const mx_ramp4 = TSL.mx_ramp4;
  363. const mx_ramplr = TSL.mx_ramplr;
  364. const mx_ramptb = TSL.mx_ramptb;
  365. const mx_rgbtohsv = TSL.mx_rgbtohsv;
  366. const mx_rotate2d = TSL.mx_rotate2d;
  367. const mx_rotate3d = TSL.mx_rotate3d;
  368. const mx_safepower = TSL.mx_safepower;
  369. const mx_separate = TSL.mx_separate;
  370. const mx_splitlr = TSL.mx_splitlr;
  371. const mx_splittb = TSL.mx_splittb;
  372. const mx_srgb_texture_to_lin_rec709 = TSL.mx_srgb_texture_to_lin_rec709;
  373. const mx_subtract = TSL.mx_subtract;
  374. const mx_timer = TSL.mx_timer;
  375. const mx_transform_uv = TSL.mx_transform_uv;
  376. const mx_unifiednoise2d = TSL.mx_unifiednoise2d;
  377. const mx_unifiednoise3d = TSL.mx_unifiednoise3d;
  378. const mx_worley_noise_float = TSL.mx_worley_noise_float;
  379. const mx_worley_noise_vec2 = TSL.mx_worley_noise_vec2;
  380. const mx_worley_noise_vec3 = TSL.mx_worley_noise_vec3;
  381. const negate = TSL.negate;
  382. const neutralToneMapping = TSL.neutralToneMapping;
  383. const nodeArray = TSL.nodeArray;
  384. const nodeImmutable = TSL.nodeImmutable;
  385. const nodeObject = TSL.nodeObject;
  386. const nodeObjectIntent = TSL.nodeObjectIntent;
  387. const nodeObjects = TSL.nodeObjects;
  388. const nodeProxy = TSL.nodeProxy;
  389. const nodeProxyIntent = TSL.nodeProxyIntent;
  390. const normalFlat = TSL.normalFlat;
  391. const normalGeometry = TSL.normalGeometry;
  392. const normalLocal = TSL.normalLocal;
  393. const normalMap = TSL.normalMap;
  394. const normalView = TSL.normalView;
  395. const normalViewGeometry = TSL.normalViewGeometry;
  396. const normalWorld = TSL.normalWorld;
  397. const normalWorldGeometry = TSL.normalWorldGeometry;
  398. const normalize = TSL.normalize;
  399. const not = TSL.not;
  400. const notEqual = TSL.notEqual;
  401. const numWorkgroups = TSL.numWorkgroups;
  402. const objectDirection = TSL.objectDirection;
  403. const objectGroup = TSL.objectGroup;
  404. const objectPosition = TSL.objectPosition;
  405. const objectRadius = TSL.objectRadius;
  406. const objectScale = TSL.objectScale;
  407. const objectViewPosition = TSL.objectViewPosition;
  408. const objectWorldMatrix = TSL.objectWorldMatrix;
  409. const OnBeforeObjectUpdate = TSL.OnBeforeObjectUpdate;
  410. const OnBeforeMaterialUpdate = TSL.OnBeforeMaterialUpdate;
  411. const OnObjectUpdate = TSL.OnObjectUpdate;
  412. const OnMaterialUpdate = TSL.OnMaterialUpdate;
  413. const oneMinus = TSL.oneMinus;
  414. const or = TSL.or;
  415. const orthographicDepthToViewZ = TSL.orthographicDepthToViewZ;
  416. const oscSawtooth = TSL.oscSawtooth;
  417. const oscSine = TSL.oscSine;
  418. const oscSquare = TSL.oscSquare;
  419. const oscTriangle = TSL.oscTriangle;
  420. const output = TSL.output;
  421. const outputStruct = TSL.outputStruct;
  422. const overloadingFn = TSL.overloadingFn;
  423. const packHalf2x16 = TSL.packHalf2x16;
  424. const packSnorm2x16 = TSL.packSnorm2x16;
  425. const packUnorm2x16 = TSL.packUnorm2x16;
  426. const parabola = TSL.parabola;
  427. const parallaxDirection = TSL.parallaxDirection;
  428. const parallaxUV = TSL.parallaxUV;
  429. const parameter = TSL.parameter;
  430. const pass = TSL.pass;
  431. const passTexture = TSL.passTexture;
  432. const pcurve = TSL.pcurve;
  433. const perspectiveDepthToViewZ = TSL.perspectiveDepthToViewZ;
  434. const pmremTexture = TSL.pmremTexture;
  435. const pointShadow = TSL.pointShadow;
  436. const pointUV = TSL.pointUV;
  437. const pointWidth = TSL.pointWidth;
  438. const positionGeometry = TSL.positionGeometry;
  439. const positionLocal = TSL.positionLocal;
  440. const positionPrevious = TSL.positionPrevious;
  441. const positionView = TSL.positionView;
  442. const positionViewDirection = TSL.positionViewDirection;
  443. const positionWorld = TSL.positionWorld;
  444. const positionWorldDirection = TSL.positionWorldDirection;
  445. const posterize = TSL.posterize;
  446. const pow = TSL.pow;
  447. const pow2 = TSL.pow2;
  448. const pow3 = TSL.pow3;
  449. const pow4 = TSL.pow4;
  450. const premultiplyAlpha = TSL.premultiplyAlpha;
  451. const property = TSL.property;
  452. const radians = TSL.radians;
  453. const rand = TSL.rand;
  454. const range = TSL.range;
  455. const rangeFog = TSL.rangeFog;
  456. const rangeFogFactor = TSL.rangeFogFactor;
  457. const reciprocal = TSL.reciprocal;
  458. const reference = TSL.reference;
  459. const referenceBuffer = TSL.referenceBuffer;
  460. const reflect = TSL.reflect;
  461. const reflectVector = TSL.reflectVector;
  462. const reflectView = TSL.reflectView;
  463. const reflector = TSL.reflector;
  464. const refract = TSL.refract;
  465. const refractVector = TSL.refractVector;
  466. const refractView = TSL.refractView;
  467. const reinhardToneMapping = TSL.reinhardToneMapping;
  468. const remap = TSL.remap;
  469. const remapClamp = TSL.remapClamp;
  470. const renderGroup = TSL.renderGroup;
  471. const renderOutput = TSL.renderOutput;
  472. const rendererReference = TSL.rendererReference;
  473. const replaceDefaultUV = TSL.replaceDefaultUV;
  474. const rotate = TSL.rotate;
  475. const rotateUV = TSL.rotateUV;
  476. const roughness = TSL.roughness;
  477. const round = TSL.round;
  478. const rtt = TSL.rtt;
  479. const sRGBTransferEOTF = TSL.sRGBTransferEOTF;
  480. const sRGBTransferOETF = TSL.sRGBTransferOETF;
  481. const sample = TSL.sample;
  482. const sampler = TSL.sampler;
  483. const samplerComparison = TSL.samplerComparison;
  484. const saturate = TSL.saturate;
  485. const saturation = TSL.saturation;
  486. const screen = TSL.screen;
  487. const screenCoordinate = TSL.screenCoordinate;
  488. const screenDPR = TSL.screenDPR;
  489. const screenSize = TSL.screenSize;
  490. const screenUV = TSL.screenUV;
  491. const scriptable = TSL.scriptable;
  492. const scriptableValue = TSL.scriptableValue;
  493. const select = TSL.select;
  494. const setCurrentStack = TSL.setCurrentStack;
  495. const setName = TSL.setName;
  496. const shaderStages = TSL.shaderStages;
  497. const shadow = TSL.shadow;
  498. const shadowPositionWorld = TSL.shadowPositionWorld;
  499. const shapeCircle = TSL.shapeCircle;
  500. const sharedUniformGroup = TSL.sharedUniformGroup;
  501. const sheen = TSL.sheen;
  502. const sheenRoughness = TSL.sheenRoughness;
  503. const shiftLeft = TSL.shiftLeft;
  504. const shiftRight = TSL.shiftRight;
  505. const shininess = TSL.shininess;
  506. const sign = TSL.sign;
  507. const sin = TSL.sin;
  508. const sinc = TSL.sinc;
  509. const skinning = TSL.skinning;
  510. const smoothstep = TSL.smoothstep;
  511. const smoothstepElement = TSL.smoothstepElement;
  512. const specularColor = TSL.specularColor;
  513. const specularF90 = TSL.specularF90;
  514. const spherizeUV = TSL.spherizeUV;
  515. const split = TSL.split;
  516. const spritesheetUV = TSL.spritesheetUV;
  517. const sqrt = TSL.sqrt;
  518. const stack = TSL.stack;
  519. const step = TSL.step;
  520. const stepElement = TSL.stepElement;
  521. const storage = TSL.storage;
  522. const storageBarrier = TSL.storageBarrier;
  523. const storageTexture = TSL.storageTexture;
  524. const string = TSL.string;
  525. const struct = TSL.struct;
  526. const sub = TSL.sub;
  527. const subgroupAdd = TSL.subgroupAdd;
  528. const subgroupAll = TSL.subgroupAll;
  529. const subgroupAnd = TSL.subgroupAnd;
  530. const subgroupAny = TSL.subgroupAny;
  531. const subgroupBallot = TSL.subgroupBallot;
  532. const subgroupBroadcast = TSL.subgroupBroadcast;
  533. const subgroupBroadcastFirst = TSL.subgroupBroadcastFirst;
  534. const subBuild = TSL.subBuild;
  535. const subgroupElect = TSL.subgroupElect;
  536. const subgroupExclusiveAdd = TSL.subgroupExclusiveAdd;
  537. const subgroupExclusiveMul = TSL.subgroupExclusiveMul;
  538. const subgroupInclusiveAdd = TSL.subgroupInclusiveAdd;
  539. const subgroupInclusiveMul = TSL.subgroupInclusiveMul;
  540. const subgroupIndex = TSL.subgroupIndex;
  541. const subgroupMax = TSL.subgroupMax;
  542. const subgroupMin = TSL.subgroupMin;
  543. const subgroupMul = TSL.subgroupMul;
  544. const subgroupOr = TSL.subgroupOr;
  545. const subgroupShuffle = TSL.subgroupShuffle;
  546. const subgroupShuffleDown = TSL.subgroupShuffleDown;
  547. const subgroupShuffleUp = TSL.subgroupShuffleUp;
  548. const subgroupShuffleXor = TSL.subgroupShuffleXor;
  549. const subgroupSize = TSL.subgroupSize;
  550. const subgroupXor = TSL.subgroupXor;
  551. const tan = TSL.tan;
  552. const tangentGeometry = TSL.tangentGeometry;
  553. const tangentLocal = TSL.tangentLocal;
  554. const tangentView = TSL.tangentView;
  555. const tangentWorld = TSL.tangentWorld;
  556. const texture = TSL.texture;
  557. const texture3D = TSL.texture3D;
  558. const textureBarrier = TSL.textureBarrier;
  559. const textureBicubic = TSL.textureBicubic;
  560. const textureBicubicLevel = TSL.textureBicubicLevel;
  561. const textureCubeUV = TSL.textureCubeUV;
  562. const textureLoad = TSL.textureLoad;
  563. const textureSize = TSL.textureSize;
  564. const textureLevel = TSL.textureLevel;
  565. const textureStore = TSL.textureStore;
  566. const thickness = TSL.thickness;
  567. const time = TSL.time;
  568. const toneMapping = TSL.toneMapping;
  569. const toneMappingExposure = TSL.toneMappingExposure;
  570. const toonOutlinePass = TSL.toonOutlinePass;
  571. const transformDirection = TSL.transformDirection;
  572. const transformNormal = TSL.transformNormal;
  573. const transformNormalToView = TSL.transformNormalToView;
  574. const transformedClearcoatNormalView = TSL.transformedClearcoatNormalView;
  575. const transformedNormalView = TSL.transformedNormalView;
  576. const transformedNormalWorld = TSL.transformedNormalWorld;
  577. const transmission = TSL.transmission;
  578. const transpose = TSL.transpose;
  579. const triNoise3D = TSL.triNoise3D;
  580. const triplanarTexture = TSL.triplanarTexture;
  581. const triplanarTextures = TSL.triplanarTextures;
  582. const trunc = TSL.trunc;
  583. const uint = TSL.uint;
  584. const uintBitsToFloat = TSL.uintBitsToFloat;
  585. const uniform = TSL.uniform;
  586. const uniformArray = TSL.uniformArray;
  587. const uniformCubeTexture = TSL.uniformCubeTexture;
  588. const uniformGroup = TSL.uniformGroup;
  589. const uniformFlow = TSL.uniformFlow;
  590. const uniformTexture = TSL.uniformTexture;
  591. const unpackHalf2x16 = TSL.unpackHalf2x16;
  592. const unpackSnorm2x16 = TSL.unpackSnorm2x16;
  593. const unpackUnorm2x16 = TSL.unpackUnorm2x16;
  594. const unpremultiplyAlpha = TSL.unpremultiplyAlpha;
  595. const userData = TSL.userData;
  596. const uv = TSL.uv;
  597. const uvec2 = TSL.uvec2;
  598. const uvec3 = TSL.uvec3;
  599. const uvec4 = TSL.uvec4;
  600. const varying = TSL.varying;
  601. const varyingProperty = TSL.varyingProperty;
  602. const vec2 = TSL.vec2;
  603. const vec3 = TSL.vec3;
  604. const vec4 = TSL.vec4;
  605. const vectorComponents = TSL.vectorComponents;
  606. const velocity = TSL.velocity;
  607. const vertexColor = TSL.vertexColor;
  608. const vertexIndex = TSL.vertexIndex;
  609. const vertexStage = TSL.vertexStage;
  610. const vibrance = TSL.vibrance;
  611. const viewZToLogarithmicDepth = TSL.viewZToLogarithmicDepth;
  612. const viewZToOrthographicDepth = TSL.viewZToOrthographicDepth;
  613. const viewZToPerspectiveDepth = TSL.viewZToPerspectiveDepth;
  614. const viewport = TSL.viewport;
  615. const viewportCoordinate = TSL.viewportCoordinate;
  616. const viewportDepthTexture = TSL.viewportDepthTexture;
  617. const viewportLinearDepth = TSL.viewportLinearDepth;
  618. const viewportMipTexture = TSL.viewportMipTexture;
  619. const viewportOpaqueMipTexture = TSL.viewportOpaqueMipTexture;
  620. const viewportResolution = TSL.viewportResolution;
  621. const viewportSafeUV = TSL.viewportSafeUV;
  622. const viewportSharedTexture = TSL.viewportSharedTexture;
  623. const viewportSize = TSL.viewportSize;
  624. const viewportTexture = TSL.viewportTexture;
  625. const viewportUV = TSL.viewportUV;
  626. const wgsl = TSL.wgsl;
  627. const wgslFn = TSL.wgslFn;
  628. const workgroupArray = TSL.workgroupArray;
  629. const workgroupBarrier = TSL.workgroupBarrier;
  630. const workgroupId = TSL.workgroupId;
  631. const workingToColorSpace = TSL.workingToColorSpace;
  632. const xor = TSL.xor;
  633. /*
  634. // Use this code to generate the export statements dynamically
  635. let code = '';
  636. for ( const key of Object.keys( THREE.TSL ) ) {
  637. code += `export const ${ key } = TSL.${ key };\n`;
  638. }
  639. log( code );
  640. //*/
  641. export { BRDF_GGX, BRDF_Lambert, BasicPointShadowFilter, BasicShadowFilter, Break, Const, Continue, DFGLUT, D_GGX, Discard, EPSILON, F_Schlick, Fn, HALF_PI, INFINITY, If, Loop, NodeAccess, NodeShaderStage, NodeType, NodeUpdateType, OnBeforeMaterialUpdate, OnBeforeObjectUpdate, OnMaterialUpdate, OnObjectUpdate, PCFShadowFilter, PCFSoftShadowFilter, PI, PI2, PointShadowFilter, Return, Schlick_to_F0, ScriptableNodeResources, ShaderNode, Stack, Switch, TBNViewMatrix, TWO_PI, VSMShadowFilter, V_GGX_SmithCorrelated, Var, VarIntent, abs, acesFilmicToneMapping, acos, add, addMethodChaining, addNodeElement, agxToneMapping, all, alphaT, and, anisotropy, anisotropyB, anisotropyT, any, append, array, arrayBuffer, asin, assign, atan, atomicAdd, atomicAnd, atomicFunc, atomicLoad, atomicMax, atomicMin, atomicOr, atomicStore, atomicSub, atomicXor, attenuationColor, attenuationDistance, attribute, attributeArray, backgroundBlurriness, backgroundIntensity, backgroundRotation, batch, bentNormalView, billboarding, bitAnd, bitNot, bitOr, bitXor, bitangentGeometry, bitangentLocal, bitangentView, bitangentWorld, bitcast, blendBurn, blendColor, blendDodge, blendOverlay, blendScreen, blur, bool, buffer, bufferAttribute, builtin, builtinAOContext, builtinShadowContext, bumpMap, bvec2, bvec3, bvec4, bypass, cache, call, cameraFar, cameraIndex, cameraNear, cameraNormalMatrix, cameraPosition, cameraProjectionMatrix, cameraProjectionMatrixInverse, cameraViewMatrix, cameraViewport, cameraWorldMatrix, cbrt, cdl, ceil, checker, cineonToneMapping, clamp, clearcoat, clearcoatNormalView, clearcoatRoughness, clipSpace, code, color, colorSpaceToWorking, colorToDirection, compute, computeKernel, computeSkinning, context, convert, convertColorSpace, convertToTexture, cos, countLeadingZeros, countOneBits, countTrailingZeros, cross, cubeTexture, cubeTextureBase, dFdx, dFdy, dashSize, debug, decrement, decrementBefore, defaultBuildStages, defaultShaderStages, defined, degrees, deltaTime, densityFog, densityFogFactor, depth, depthPass, determinant, difference, diffuseColor, directPointLight, directionToColor, directionToFaceDirection, dispersion, distance, div, dot, drawIndex, dynamicBufferAttribute, element, emissive, equal, equirectUV, exp, exp2, exponentialHeightFogFactor, expression, faceDirection, faceForward, faceforward, float, floatBitsToInt, floatBitsToUint, floor, fog, fract, frameGroup, frameId, frontFacing, fwidth, gain, gapSize, getConstNodeType, getCurrentStack, getDirection, getDistanceAttenuation, getGeometryRoughness, getNormalFromDepth, getParallaxCorrectNormal, getRoughness, getScreenPosition, getShIrradianceAt, getShadowMaterial, getShadowRenderObjectFunction, getTextureIndex, getViewPosition, globalId, glsl, glslFn, grayscale, greaterThan, greaterThanEqual, hash, highpModelNormalViewMatrix, highpModelViewMatrix, hue, increment, incrementBefore, instance, instanceIndex, instancedArray, instancedBufferAttribute, instancedDynamicBufferAttribute, instancedMesh, int, intBitsToFloat, interleavedGradientNoise, inverse, inverseSqrt, inversesqrt, invocationLocalIndex, invocationSubgroupIndex, ior, iridescence, iridescenceIOR, iridescenceThickness, ivec2, ivec3, ivec4, js, label, length, lengthSq, lessThan, lessThanEqual, lightPosition, lightProjectionUV, lightShadowMatrix, lightTargetDirection, lightTargetPosition, lightViewPosition, lightingContext, lights, linearDepth, linearToneMapping, localId, log, log2, logarithmicDepthToViewZ, luminance, mat2, mat3, mat4, matcapUV, materialAO, materialAlphaTest, materialAnisotropy, materialAnisotropyVector, materialAttenuationColor, materialAttenuationDistance, materialClearcoat, materialClearcoatNormal, materialClearcoatRoughness, materialColor, materialDispersion, materialEmissive, materialEnvIntensity, materialEnvRotation, materialIOR, materialIridescence, materialIridescenceIOR, materialIridescenceThickness, materialLightMap, materialLineDashOffset, materialLineDashSize, materialLineGapSize, materialLineScale, materialLineWidth, materialMetalness, materialNormal, materialOpacity, materialPointSize, materialReference, materialReflectivity, materialRefractionRatio, materialRotation, materialRoughness, materialSheen, materialSheenRoughness, materialShininess, materialSpecular, materialSpecularColor, materialSpecularIntensity, materialSpecularStrength, materialThickness, materialTransmission, max, maxMipLevel, mediumpModelViewMatrix, metalness, min, mix, mixElement, mod, modInt, modelDirection, modelNormalMatrix, modelPosition, modelRadius, modelScale, modelViewMatrix, modelViewPosition, modelViewProjection, modelWorldMatrix, modelWorldMatrixInverse, morphReference, mrt, mul, mx_aastep, mx_add, mx_atan2, mx_cell_noise_float, mx_contrast, mx_divide, mx_fractal_noise_float, mx_fractal_noise_vec2, mx_fractal_noise_vec3, mx_fractal_noise_vec4, mx_frame, mx_heighttonormal, mx_hsvtorgb, mx_ifequal, mx_ifgreater, mx_ifgreatereq, mx_invert, mx_modulo, mx_multiply, mx_noise_float, mx_noise_vec3, mx_noise_vec4, mx_place2d, mx_power, mx_ramp4, mx_ramplr, mx_ramptb, mx_rgbtohsv, mx_rotate2d, mx_rotate3d, mx_safepower, mx_separate, mx_splitlr, mx_splittb, mx_srgb_texture_to_lin_rec709, mx_subtract, mx_timer, mx_transform_uv, mx_unifiednoise2d, mx_unifiednoise3d, mx_worley_noise_float, mx_worley_noise_vec2, mx_worley_noise_vec3, negate, neutralToneMapping, nodeArray, nodeImmutable, nodeObject, nodeObjectIntent, nodeObjects, nodeProxy, nodeProxyIntent, normalFlat, normalGeometry, normalLocal, normalMap, normalView, normalViewGeometry, normalWorld, normalWorldGeometry, normalize, not, notEqual, numWorkgroups, objectDirection, objectGroup, objectPosition, objectRadius, objectScale, objectViewPosition, objectWorldMatrix, oneMinus, or, orthographicDepthToViewZ, oscSawtooth, oscSine, oscSquare, oscTriangle, output, outputStruct, overloadingFn, packHalf2x16, packSnorm2x16, packUnorm2x16, parabola, parallaxDirection, parallaxUV, parameter, pass, passTexture, pcurve, perspectiveDepthToViewZ, pmremTexture, pointShadow, pointUV, pointWidth, positionGeometry, positionLocal, positionPrevious, positionView, positionViewDirection, positionWorld, positionWorldDirection, posterize, pow, pow2, pow3, pow4, premultiplyAlpha, property, radians, rand, range, rangeFog, rangeFogFactor, reciprocal, reference, referenceBuffer, reflect, reflectVector, reflectView, reflector, refract, refractVector, refractView, reinhardToneMapping, remap, remapClamp, renderGroup, renderOutput, rendererReference, replaceDefaultUV, rotate, rotateUV, roughness, round, rtt, sRGBTransferEOTF, sRGBTransferOETF, sample, sampler, samplerComparison, saturate, saturation, screen, screenCoordinate, screenDPR, screenSize, screenUV, scriptable, scriptableValue, select, setCurrentStack, setName, shaderStages, shadow, shadowPositionWorld, shapeCircle, sharedUniformGroup, sheen, sheenRoughness, shiftLeft, shiftRight, shininess, sign, sin, sinc, skinning, smoothstep, smoothstepElement, specularColor, specularF90, spherizeUV, split, spritesheetUV, sqrt, stack, step, stepElement, storage, storageBarrier, storageTexture, string, struct, sub, subBuild, subgroupAdd, subgroupAll, subgroupAnd, subgroupAny, subgroupBallot, subgroupBroadcast, subgroupBroadcastFirst, subgroupElect, subgroupExclusiveAdd, subgroupExclusiveMul, subgroupInclusiveAdd, subgroupInclusiveMul, subgroupIndex, subgroupMax, subgroupMin, subgroupMul, subgroupOr, subgroupShuffle, subgroupShuffleDown, subgroupShuffleUp, subgroupShuffleXor, subgroupSize, subgroupXor, tan, tangentGeometry, tangentLocal, tangentView, tangentWorld, texture, texture3D, textureBarrier, textureBicubic, textureBicubicLevel, textureCubeUV, textureLevel, textureLoad, textureSize, textureStore, thickness, time, toneMapping, toneMappingExposure, toonOutlinePass, transformDirection, transformNormal, transformNormalToView, transformedClearcoatNormalView, transformedNormalView, transformedNormalWorld, transmission, transpose, triNoise3D, triplanarTexture, triplanarTextures, trunc, uint, uintBitsToFloat, uniform, uniformArray, uniformCubeTexture, uniformFlow, uniformGroup, uniformTexture, unpackHalf2x16, unpackSnorm2x16, unpackUnorm2x16, unpremultiplyAlpha, userData, uv, uvec2, uvec3, uvec4, varying, varyingProperty, vec2, vec3, vec4, vectorComponents, velocity, vertexColor, vertexIndex, vertexStage, vibrance, viewZToLogarithmicDepth, viewZToOrthographicDepth, viewZToPerspectiveDepth, viewport, viewportCoordinate, viewportDepthTexture, viewportLinearDepth, viewportMipTexture, viewportOpaqueMipTexture, viewportResolution, viewportSafeUV, viewportSharedTexture, viewportSize, viewportTexture, viewportUV, vogelDiskSample, wgsl, wgslFn, workgroupArray, workgroupBarrier, workgroupId, workingToColorSpace, xor };
粤ICP备19079148号