@plastic-software/three 0.179.0 → 0.181.1

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 (430) hide show
  1. package/build/three.cjs +1108 -591
  2. package/build/three.core.js +616 -345
  3. package/build/three.core.min.js +1 -1
  4. package/build/three.module.js +488 -250
  5. package/build/three.module.min.js +1 -1
  6. package/build/three.tsl.js +37 -6
  7. package/build/three.tsl.min.js +1 -1
  8. package/build/three.webgpu.js +6576 -2152
  9. package/build/three.webgpu.min.js +1 -1
  10. package/build/three.webgpu.nodes.js +6575 -2151
  11. package/build/three.webgpu.nodes.min.js +1 -1
  12. package/examples/fonts/MPLUSRounded1c/MPLUSRounded1c-Regular.typeface.json.zip +0 -0
  13. package/examples/fonts/MPLUSRounded1c/OFL.txt +91 -0
  14. package/examples/jsm/Addons.js +1 -1
  15. package/examples/jsm/animation/CCDIKSolver.js +1 -1
  16. package/examples/jsm/controls/ArcballControls.js +8 -8
  17. package/examples/jsm/controls/DragControls.js +7 -57
  18. package/examples/jsm/controls/FirstPersonControls.js +3 -3
  19. package/examples/jsm/controls/FlyControls.js +1 -1
  20. package/examples/jsm/controls/OrbitControls.js +2 -2
  21. package/examples/jsm/controls/PointerLockControls.js +2 -10
  22. package/examples/jsm/controls/TrackballControls.js +1 -1
  23. package/examples/jsm/controls/TransformControls.js +1 -1
  24. package/examples/jsm/effects/AsciiEffect.js +8 -8
  25. package/examples/jsm/exporters/DRACOExporter.js +2 -2
  26. package/examples/jsm/exporters/EXRExporter.js +1 -1
  27. package/examples/jsm/exporters/GLTFExporter.js +33 -25
  28. package/examples/jsm/exporters/KTX2Exporter.js +4 -2
  29. package/examples/jsm/exporters/PLYExporter.js +1 -1
  30. package/examples/jsm/exporters/USDZExporter.js +9 -2
  31. package/examples/jsm/geometries/DecalGeometry.js +2 -2
  32. package/examples/jsm/geometries/ParametricGeometry.js +1 -1
  33. package/examples/jsm/geometries/TeapotGeometry.js +2 -2
  34. package/examples/jsm/geometries/TextGeometry.js +3 -2
  35. package/examples/jsm/gpgpu/BitonicSort.js +715 -0
  36. package/examples/jsm/helpers/ViewHelper.js +43 -5
  37. package/examples/jsm/inspector/Inspector.js +427 -0
  38. package/examples/jsm/inspector/RendererInspector.js +415 -0
  39. package/examples/jsm/inspector/tabs/Console.js +204 -0
  40. package/examples/jsm/inspector/tabs/Parameters.js +332 -0
  41. package/examples/jsm/inspector/tabs/Performance.js +268 -0
  42. package/examples/jsm/inspector/tabs/Viewer.js +166 -0
  43. package/examples/jsm/inspector/ui/Graph.js +95 -0
  44. package/examples/jsm/inspector/ui/Item.js +170 -0
  45. package/examples/jsm/inspector/ui/List.js +75 -0
  46. package/examples/jsm/inspector/ui/Profiler.js +170 -0
  47. package/examples/jsm/inspector/ui/Style.js +654 -0
  48. package/examples/jsm/inspector/ui/Tab.js +46 -0
  49. package/examples/jsm/inspector/ui/Values.js +423 -0
  50. package/examples/jsm/inspector/ui/utils.js +56 -0
  51. package/examples/jsm/interactive/HTMLMesh.js +6 -10
  52. package/examples/jsm/interactive/InteractiveGroup.js +1 -1
  53. package/examples/jsm/interactive/SelectionBox.js +30 -0
  54. package/examples/jsm/libs/ktx-parse.module.js +1 -1
  55. package/examples/jsm/lights/RectAreaLightTexturesLib.js +1 -1
  56. package/examples/jsm/lines/Line2.js +3 -3
  57. package/examples/jsm/lines/LineGeometry.js +1 -1
  58. package/examples/jsm/lines/LineSegments2.js +2 -2
  59. package/examples/jsm/lines/Wireframe.js +2 -2
  60. package/examples/jsm/lines/WireframeGeometry2.js +1 -1
  61. package/examples/jsm/lines/webgpu/LineSegments2.js +1 -1
  62. package/examples/jsm/lines/webgpu/Wireframe.js +1 -1
  63. package/examples/jsm/loaders/3MFLoader.js +1 -1
  64. package/examples/jsm/loaders/ColladaLoader.js +3 -3
  65. package/examples/jsm/loaders/DDSLoader.js +1 -1
  66. package/examples/jsm/loaders/DRACOLoader.js +73 -22
  67. package/examples/jsm/loaders/EXRLoader.js +5 -5
  68. package/examples/jsm/loaders/FBXLoader.js +2 -2
  69. package/examples/jsm/loaders/FontLoader.js +23 -5
  70. package/examples/jsm/loaders/GLTFLoader.js +14 -8
  71. package/examples/jsm/loaders/HDRCubeTextureLoader.js +5 -5
  72. package/examples/jsm/loaders/HDRLoader.js +486 -0
  73. package/examples/jsm/loaders/KTX2Loader.js +136 -49
  74. package/examples/jsm/loaders/KTXLoader.js +2 -2
  75. package/examples/jsm/loaders/LDrawLoader.js +1 -1
  76. package/examples/jsm/loaders/LUT3dlLoader.js +2 -2
  77. package/examples/jsm/loaders/LUTCubeLoader.js +1 -1
  78. package/examples/jsm/loaders/LWOLoader.js +2 -2
  79. package/examples/jsm/loaders/MaterialXLoader.js +22 -5
  80. package/examples/jsm/loaders/OBJLoader.js +1 -1
  81. package/examples/jsm/loaders/PDBLoader.js +1 -1
  82. package/examples/jsm/loaders/RGBELoader.js +7 -473
  83. package/examples/jsm/loaders/SVGLoader.js +2 -2
  84. package/examples/jsm/loaders/TTFLoader.js +4 -4
  85. package/examples/jsm/loaders/UltraHDRLoader.js +2 -2
  86. package/examples/jsm/loaders/lwo/IFFParser.js +1 -1
  87. package/examples/jsm/materials/WoodNodeMaterial.js +533 -0
  88. package/examples/jsm/math/ColorSpaces.js +19 -1
  89. package/examples/jsm/math/ConvexHull.js +3 -3
  90. package/examples/jsm/math/ImprovedNoise.js +1 -1
  91. package/examples/jsm/math/Lut.js +2 -2
  92. package/examples/jsm/math/SimplexNoise.js +1 -1
  93. package/examples/jsm/misc/MD2CharacterComplex.js +1 -1
  94. package/examples/jsm/misc/ProgressiveLightMap.js +9 -3
  95. package/examples/jsm/misc/ProgressiveLightMapGPU.js +7 -1
  96. package/examples/jsm/misc/TubePainter.js +383 -40
  97. package/examples/jsm/misc/Volume.js +1 -1
  98. package/examples/jsm/modifiers/SimplifyModifier.js +1 -1
  99. package/examples/jsm/objects/ReflectorForSSRPass.js +1 -0
  100. package/examples/jsm/objects/Sky.js +1 -1
  101. package/examples/jsm/objects/SkyMesh.js +1 -1
  102. package/examples/jsm/objects/Water.js +3 -3
  103. package/examples/jsm/objects/WaterMesh.js +6 -6
  104. package/examples/jsm/postprocessing/GlitchPass.js +2 -2
  105. package/examples/jsm/postprocessing/OutlinePass.js +1 -1
  106. package/examples/jsm/postprocessing/SSRPass.js +37 -8
  107. package/examples/jsm/postprocessing/UnrealBloomPass.js +8 -6
  108. package/examples/jsm/renderers/CSS2DRenderer.js +16 -5
  109. package/examples/jsm/renderers/CSS3DRenderer.js +7 -6
  110. package/examples/jsm/renderers/SVGRenderer.js +1 -1
  111. package/examples/jsm/shaders/ACESFilmicToneMappingShader.js +1 -1
  112. package/examples/jsm/shaders/AfterimageShader.js +1 -1
  113. package/examples/jsm/shaders/BleachBypassShader.js +1 -1
  114. package/examples/jsm/shaders/BokehShader.js +1 -1
  115. package/examples/jsm/shaders/BokehShader2.js +1 -1
  116. package/examples/jsm/shaders/DotScreenShader.js +1 -1
  117. package/examples/jsm/shaders/FocusShader.js +1 -1
  118. package/examples/jsm/shaders/GTAOShader.js +2 -2
  119. package/examples/jsm/shaders/GodRaysShader.js +1 -1
  120. package/examples/jsm/shaders/KaleidoShader.js +1 -1
  121. package/examples/jsm/shaders/PoissonDenoiseShader.js +2 -2
  122. package/examples/jsm/shaders/SSRShader.js +1 -1
  123. package/examples/jsm/shaders/SepiaShader.js +1 -1
  124. package/examples/jsm/shaders/SubsurfaceScatteringShader.js +1 -1
  125. package/examples/jsm/shaders/TriangleBlurShader.js +1 -1
  126. package/examples/jsm/shaders/UnpackDepthRGBAShader.js +1 -1
  127. package/examples/jsm/shaders/VignetteShader.js +1 -1
  128. package/examples/jsm/transpiler/GLSLDecoder.js +22 -19
  129. package/examples/jsm/transpiler/TSLEncoder.js +9 -10
  130. package/examples/jsm/transpiler/WGSLEncoder.js +24 -0
  131. package/examples/jsm/tsl/display/AfterImageNode.js +26 -24
  132. package/examples/jsm/tsl/display/AnamorphicNode.js +28 -4
  133. package/examples/jsm/tsl/display/BloomNode.js +7 -3
  134. package/examples/jsm/tsl/display/ChromaticAberrationNode.js +2 -1
  135. package/examples/jsm/tsl/display/DenoiseNode.js +2 -0
  136. package/examples/jsm/tsl/display/DepthOfFieldNode.js +446 -90
  137. package/examples/jsm/tsl/display/GTAONode.js +53 -5
  138. package/examples/jsm/tsl/display/GaussianBlurNode.js +49 -35
  139. package/examples/jsm/tsl/display/OutlineNode.js +13 -2
  140. package/examples/jsm/tsl/display/SSGINode.js +654 -0
  141. package/examples/jsm/tsl/display/SSRNode.js +182 -65
  142. package/examples/jsm/tsl/display/SSSNode.js +488 -0
  143. package/examples/jsm/tsl/display/TRAANode.js +124 -7
  144. package/examples/jsm/tsl/display/boxBlur.js +65 -0
  145. package/examples/jsm/tsl/display/hashBlur.js +16 -18
  146. package/examples/jsm/tsl/lighting/TiledLightsNode.js +21 -1
  147. package/examples/jsm/utils/BufferGeometryUtils.js +1 -1
  148. package/examples/jsm/utils/ShadowMapViewerGPU.js +12 -5
  149. package/examples/jsm/webxr/OculusHandModel.js +1 -1
  150. package/examples/jsm/webxr/XRControllerModelFactory.js +1 -1
  151. package/examples/jsm/webxr/XRHandModelFactory.js +2 -6
  152. package/package.json +5 -10
  153. package/src/Three.Core.js +4 -2
  154. package/src/Three.TSL.js +36 -5
  155. package/src/Three.WebGPU.Nodes.js +2 -0
  156. package/src/Three.WebGPU.js +2 -0
  157. package/src/animation/AnimationClip.js +20 -4
  158. package/src/animation/AnimationMixer.js +3 -3
  159. package/src/animation/AnimationObjectGroup.js +2 -1
  160. package/src/animation/KeyframeTrack.js +7 -6
  161. package/src/animation/PropertyBinding.js +12 -11
  162. package/src/audio/Audio.js +10 -9
  163. package/src/audio/PositionalAudio.js +1 -1
  164. package/src/cameras/OrthographicCamera.js +1 -1
  165. package/src/cameras/PerspectiveCamera.js +1 -1
  166. package/src/cameras/StereoCamera.js +2 -2
  167. package/src/constants.js +11 -3
  168. package/src/core/BufferGeometry.js +10 -10
  169. package/src/core/EventDispatcher.js +1 -1
  170. package/src/core/InterleavedBuffer.js +1 -1
  171. package/src/core/InterleavedBufferAttribute.js +3 -2
  172. package/src/core/Object3D.js +3 -2
  173. package/src/core/Raycaster.js +2 -1
  174. package/src/core/RenderTarget.js +10 -1
  175. package/src/extras/Controls.js +5 -4
  176. package/src/extras/DataUtils.js +2 -1
  177. package/src/extras/Earcut.js +6 -0
  178. package/src/extras/ImageUtils.js +2 -2
  179. package/src/extras/PMREMGenerator.js +268 -55
  180. package/src/extras/TextureUtils.js +2 -1
  181. package/src/extras/core/Curve.js +2 -1
  182. package/src/extras/core/Interpolations.js +7 -1
  183. package/src/extras/core/ShapePath.js +4 -4
  184. package/src/extras/lib/earcut.js +8 -8
  185. package/src/geometries/BoxGeometry.js +1 -0
  186. package/src/geometries/CapsuleGeometry.js +1 -0
  187. package/src/geometries/CircleGeometry.js +1 -0
  188. package/src/geometries/ConeGeometry.js +1 -0
  189. package/src/geometries/CylinderGeometry.js +1 -0
  190. package/src/geometries/DodecahedronGeometry.js +1 -0
  191. package/src/geometries/ExtrudeGeometry.js +8 -6
  192. package/src/geometries/IcosahedronGeometry.js +1 -0
  193. package/src/geometries/LatheGeometry.js +1 -0
  194. package/src/geometries/OctahedronGeometry.js +1 -0
  195. package/src/geometries/PlaneGeometry.js +1 -0
  196. package/src/geometries/RingGeometry.js +1 -0
  197. package/src/geometries/ShapeGeometry.js +1 -0
  198. package/src/geometries/SphereGeometry.js +1 -0
  199. package/src/geometries/TetrahedronGeometry.js +1 -0
  200. package/src/geometries/TorusGeometry.js +1 -0
  201. package/src/geometries/TorusKnotGeometry.js +1 -0
  202. package/src/geometries/TubeGeometry.js +1 -0
  203. package/src/helpers/CameraHelper.js +1 -1
  204. package/src/lights/webgpu/ProjectorLight.js +1 -1
  205. package/src/loaders/AnimationLoader.js +2 -1
  206. package/src/loaders/AudioLoader.js +2 -1
  207. package/src/loaders/BufferGeometryLoader.js +2 -2
  208. package/src/loaders/Cache.js +2 -2
  209. package/src/loaders/DataTextureLoader.js +1 -1
  210. package/src/loaders/FileLoader.js +3 -2
  211. package/src/loaders/ImageBitmapLoader.js +5 -4
  212. package/src/loaders/ImageLoader.js +1 -1
  213. package/src/loaders/Loader.js +3 -3
  214. package/src/loaders/LoadingManager.js +25 -3
  215. package/src/loaders/MaterialLoader.js +3 -2
  216. package/src/loaders/ObjectLoader.js +13 -13
  217. package/src/loaders/TextureLoader.js +1 -1
  218. package/src/loaders/nodes/NodeLoader.js +3 -2
  219. package/src/materials/Material.js +16 -3
  220. package/src/materials/MeshBasicMaterial.js +1 -0
  221. package/src/materials/MeshDepthMaterial.js +1 -0
  222. package/src/materials/MeshDistanceMaterial.js +1 -1
  223. package/src/materials/MeshLambertMaterial.js +2 -1
  224. package/src/materials/MeshMatcapMaterial.js +22 -0
  225. package/src/materials/MeshNormalMaterial.js +1 -0
  226. package/src/materials/MeshPhongMaterial.js +2 -1
  227. package/src/materials/MeshPhysicalMaterial.js +2 -1
  228. package/src/materials/MeshStandardMaterial.js +8 -7
  229. package/src/materials/MeshToonMaterial.js +1 -0
  230. package/src/materials/PointsMaterial.js +1 -1
  231. package/src/materials/ShaderMaterial.js +2 -2
  232. package/src/materials/nodes/Line2NodeMaterial.js +2 -2
  233. package/src/materials/nodes/MeshSSSNodeMaterial.js +1 -1
  234. package/src/materials/nodes/NodeMaterial.js +62 -22
  235. package/src/materials/nodes/PointsNodeMaterial.js +81 -28
  236. package/src/materials/nodes/SpriteNodeMaterial.js +3 -15
  237. package/src/materials/nodes/manager/NodeMaterialObserver.js +3 -2
  238. package/src/math/Color.js +6 -5
  239. package/src/math/ColorManagement.js +9 -3
  240. package/src/math/Cylindrical.js +1 -1
  241. package/src/math/Euler.js +2 -1
  242. package/src/math/MathUtils.js +13 -11
  243. package/src/math/Matrix2.js +1 -1
  244. package/src/math/Matrix3.js +2 -2
  245. package/src/math/Matrix4.js +7 -7
  246. package/src/math/Plane.js +1 -1
  247. package/src/math/Quaternion.js +68 -66
  248. package/src/math/Spherical.js +1 -1
  249. package/src/nodes/Nodes.js +4 -1
  250. package/src/nodes/TSL.js +4 -1
  251. package/src/nodes/accessors/BufferNode.js +1 -1
  252. package/src/nodes/accessors/Camera.js +133 -7
  253. package/src/nodes/accessors/ClippingNode.js +6 -5
  254. package/src/nodes/accessors/CubeTextureNode.js +5 -4
  255. package/src/nodes/accessors/InstanceNode.js +25 -5
  256. package/src/nodes/accessors/Lights.js +10 -0
  257. package/src/nodes/accessors/Normal.js +5 -4
  258. package/src/nodes/accessors/Object3DNode.js +1 -1
  259. package/src/nodes/accessors/Position.js +18 -2
  260. package/src/nodes/accessors/ReferenceBaseNode.js +1 -1
  261. package/src/nodes/accessors/ReferenceNode.js +3 -2
  262. package/src/nodes/accessors/SceneNode.js +2 -1
  263. package/src/nodes/accessors/StorageBufferNode.js +2 -1
  264. package/src/nodes/accessors/StorageTextureNode.js +22 -0
  265. package/src/nodes/accessors/Texture3DNode.js +14 -1
  266. package/src/nodes/accessors/TextureNode.js +130 -44
  267. package/src/nodes/code/FunctionCallNode.js +24 -4
  268. package/src/nodes/code/FunctionNode.js +23 -0
  269. package/src/nodes/core/ArrayNode.js +1 -0
  270. package/src/nodes/core/AssignNode.js +4 -3
  271. package/src/nodes/core/AttributeNode.js +2 -1
  272. package/src/nodes/core/ContextNode.js +29 -10
  273. package/src/nodes/core/IndexNode.js +2 -2
  274. package/src/nodes/core/InputNode.js +2 -1
  275. package/src/nodes/core/InspectorNode.js +128 -0
  276. package/src/nodes/core/{CacheNode.js → IsolateNode.js} +40 -7
  277. package/src/nodes/core/Node.js +152 -31
  278. package/src/nodes/core/NodeBuilder.js +183 -35
  279. package/src/nodes/core/NodeFrame.js +21 -21
  280. package/src/nodes/core/NodeFunction.js +2 -1
  281. package/src/nodes/core/NodeParser.js +2 -1
  282. package/src/nodes/core/NodeUniform.js +1 -1
  283. package/src/nodes/core/NodeUtils.js +17 -91
  284. package/src/nodes/core/ParameterNode.js +31 -0
  285. package/src/nodes/core/PropertyNode.js +7 -0
  286. package/src/nodes/core/StackNode.js +43 -16
  287. package/src/nodes/core/StructNode.js +5 -5
  288. package/src/nodes/core/StructTypeNode.js +1 -0
  289. package/src/nodes/core/SubBuildNode.js +2 -2
  290. package/src/nodes/core/UniformNode.js +18 -10
  291. package/src/nodes/core/VarNode.js +70 -33
  292. package/src/nodes/core/VaryingNode.js +3 -2
  293. package/src/nodes/display/BlendModes.js +5 -4
  294. package/src/nodes/display/BumpMapNode.js +1 -1
  295. package/src/nodes/display/ColorAdjustment.js +1 -1
  296. package/src/nodes/display/FrontFacingNode.js +4 -8
  297. package/src/nodes/display/NormalMapNode.js +2 -1
  298. package/src/nodes/display/PassNode.js +52 -11
  299. package/src/nodes/display/RenderOutputNode.js +28 -2
  300. package/src/nodes/display/ScreenNode.js +44 -14
  301. package/src/nodes/display/ToneMappingNode.js +31 -4
  302. package/src/nodes/display/ToonOutlinePassNode.js +8 -0
  303. package/src/nodes/display/ViewportDepthTextureNode.js +16 -4
  304. package/src/nodes/display/ViewportSharedTextureNode.js +12 -0
  305. package/src/nodes/display/ViewportTextureNode.js +42 -12
  306. package/src/nodes/fog/Fog.js +3 -2
  307. package/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.js +52 -0
  308. package/src/nodes/functions/BSDF/DFGApprox.js +60 -19
  309. package/src/nodes/functions/BasicLightingModel.js +2 -1
  310. package/src/nodes/functions/PhysicalLightingModel.js +3 -2
  311. package/src/nodes/functions/VolumetricLightingModel.js +5 -5
  312. package/src/nodes/geometry/RangeNode.js +40 -4
  313. package/src/nodes/gpgpu/ComputeBuiltinNode.js +2 -1
  314. package/src/nodes/gpgpu/ComputeNode.js +17 -5
  315. package/src/nodes/gpgpu/SubgroupFunctionNode.js +455 -0
  316. package/src/nodes/gpgpu/WorkgroupInfoNode.js +2 -1
  317. package/src/nodes/lighting/EnvironmentNode.js +6 -6
  318. package/src/nodes/lighting/LightsNode.js +3 -4
  319. package/src/nodes/lighting/PointShadowNode.js +6 -0
  320. package/src/nodes/lighting/ShadowFilterNode.js +2 -0
  321. package/src/nodes/lighting/ShadowNode.js +75 -8
  322. package/src/nodes/math/BitcastNode.js +156 -0
  323. package/src/nodes/math/ConditionalNode.js +24 -7
  324. package/src/nodes/math/MathNode.js +25 -19
  325. package/src/nodes/math/OperatorNode.js +7 -5
  326. package/src/nodes/pmrem/PMREMUtils.js +117 -2
  327. package/src/nodes/shapes/Shapes.js +1 -1
  328. package/src/nodes/tsl/TSLBase.js +5 -2
  329. package/src/nodes/tsl/TSLCore.js +460 -159
  330. package/src/nodes/utils/DebugNode.js +2 -1
  331. package/src/nodes/utils/EventNode.js +36 -0
  332. package/src/nodes/utils/FunctionOverloadingNode.js +37 -19
  333. package/src/nodes/utils/JoinNode.js +6 -3
  334. package/src/nodes/utils/LoopNode.js +20 -24
  335. package/src/nodes/utils/MemberNode.js +59 -7
  336. package/src/nodes/utils/PostProcessingUtils.js +28 -1
  337. package/src/nodes/utils/RTTNode.js +13 -3
  338. package/src/nodes/utils/ReflectorNode.js +58 -7
  339. package/src/nodes/utils/SampleNode.js +12 -2
  340. package/src/nodes/utils/SplitNode.js +11 -0
  341. package/src/nodes/utils/Timer.js +0 -47
  342. package/src/objects/BatchedMesh.js +2 -2
  343. package/src/objects/LOD.js +1 -1
  344. package/src/objects/Line.js +2 -1
  345. package/src/objects/LineSegments.js +2 -1
  346. package/src/objects/Skeleton.js +3 -2
  347. package/src/objects/SkinnedMesh.js +3 -1
  348. package/src/objects/Sprite.js +4 -3
  349. package/src/renderers/WebGLRenderer.js +48 -41
  350. package/src/renderers/common/Animation.js +13 -1
  351. package/src/renderers/common/Attributes.js +1 -1
  352. package/src/renderers/common/Backend.js +108 -27
  353. package/src/renderers/common/Background.js +2 -1
  354. package/src/renderers/common/Bindings.js +58 -2
  355. package/src/renderers/common/CanvasTarget.js +341 -0
  356. package/src/renderers/common/ChainMap.js +1 -1
  357. package/src/renderers/common/DataMap.js +1 -1
  358. package/src/renderers/common/Geometries.js +26 -0
  359. package/src/renderers/common/Info.js +4 -2
  360. package/src/renderers/common/InspectorBase.js +146 -0
  361. package/src/renderers/common/Pipelines.js +1 -1
  362. package/src/renderers/common/PostProcessing.js +6 -25
  363. package/src/renderers/common/QuadMesh.js +7 -1
  364. package/src/renderers/common/RenderContext.js +2 -2
  365. package/src/renderers/common/RenderList.js +7 -3
  366. package/src/renderers/common/RenderObject.js +16 -2
  367. package/src/renderers/common/RenderObjects.js +1 -1
  368. package/src/renderers/common/Renderer.js +473 -245
  369. package/src/renderers/common/RendererUtils.js +9 -0
  370. package/src/renderers/common/SampledTexture.js +9 -1
  371. package/src/renderers/common/Sampler.js +50 -12
  372. package/src/renderers/common/StorageTexture.js +9 -1
  373. package/src/renderers/common/Textures.js +121 -45
  374. package/src/renderers/common/TimestampQueryPool.js +65 -3
  375. package/src/renderers/common/UniformsGroup.js +2 -1
  376. package/src/renderers/common/XRManager.js +42 -22
  377. package/src/renderers/common/extras/PMREMGenerator.js +160 -65
  378. package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
  379. package/src/renderers/common/nodes/NodeLibrary.js +9 -7
  380. package/src/renderers/common/nodes/NodeSampler.js +13 -1
  381. package/src/renderers/common/nodes/Nodes.js +38 -16
  382. package/src/renderers/shaders/DFGLUTData.js +64 -0
  383. package/src/renderers/shaders/ShaderChunk/common.glsl.js +0 -12
  384. package/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js +1 -1
  385. package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +1 -1
  386. package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +52 -18
  387. package/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js +1 -1
  388. package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js +1 -1
  389. package/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js +1 -1
  390. package/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js +1 -1
  391. package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +7 -15
  392. package/src/renderers/shaders/ShaderLib/depth.glsl.js +1 -1
  393. package/src/renderers/shaders/UniformsLib.js +1 -0
  394. package/src/renderers/shaders/UniformsUtils.js +25 -4
  395. package/src/renderers/webgl/WebGLCapabilities.js +2 -1
  396. package/src/renderers/webgl/WebGLExtensions.js +2 -25
  397. package/src/renderers/webgl/WebGLInfo.js +3 -1
  398. package/src/renderers/webgl/WebGLProgram.js +15 -14
  399. package/src/renderers/webgl/WebGLPrograms.js +2 -1
  400. package/src/renderers/webgl/WebGLShadowMap.js +3 -2
  401. package/src/renderers/webgl/WebGLState.js +15 -14
  402. package/src/renderers/webgl/WebGLTextures.js +19 -14
  403. package/src/renderers/webgl/WebGLUniformsGroups.js +5 -3
  404. package/src/renderers/webgl/WebGLUtils.js +3 -2
  405. package/src/renderers/webgl-fallback/WebGLBackend.js +199 -167
  406. package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +181 -25
  407. package/src/renderers/webgl-fallback/utils/WebGLConstants.js +2 -3
  408. package/src/renderers/webgl-fallback/utils/WebGLState.js +7 -6
  409. package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +169 -19
  410. package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +51 -22
  411. package/src/renderers/webgl-fallback/utils/WebGLUtils.js +3 -2
  412. package/src/renderers/webgpu/WebGPUBackend.js +153 -123
  413. package/src/renderers/webgpu/WebGPURenderer.Nodes.js +2 -1
  414. package/src/renderers/webgpu/WebGPURenderer.js +3 -2
  415. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +142 -50
  416. package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +2 -1
  417. package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +5 -3
  418. package/src/renderers/webgpu/utils/WebGPUConstants.js +7 -2
  419. package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +53 -34
  420. package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +6 -8
  421. package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +260 -99
  422. package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +32 -9
  423. package/src/renderers/webgpu/utils/WebGPUUtils.js +22 -2
  424. package/src/renderers/webxr/WebXRManager.js +42 -26
  425. package/src/textures/ExternalTexture.js +15 -4
  426. package/src/textures/Source.js +3 -2
  427. package/src/textures/Texture.js +3 -2
  428. package/src/textures/VideoTexture.js +2 -3
  429. package/src/utils.js +67 -3
  430. package/examples/jsm/loaders/RGBMLoader.js +0 -1148
@@ -80,13 +80,13 @@ class ViewportTextureNode extends TextureNode {
80
80
  this.isOutputTextureNode = true;
81
81
 
82
82
  /**
83
- * The `updateBeforeType` is set to `NodeUpdateType.RENDER` since the node renders the
84
- * scene once per render in its {@link ViewportTextureNode#updateBefore} method.
83
+ * The `updateBeforeType` is set to `NodeUpdateType.FRAME` since the node renders the
84
+ * scene once per frame in its {@link ViewportTextureNode#updateBefore} method.
85
85
  *
86
86
  * @type {string}
87
87
  * @default 'frame'
88
88
  */
89
- this.updateBeforeType = NodeUpdateType.RENDER;
89
+ this.updateBeforeType = NodeUpdateType.FRAME;
90
90
 
91
91
  /**
92
92
  * The framebuffer texture for the current renderer context.
@@ -94,13 +94,35 @@ class ViewportTextureNode extends TextureNode {
94
94
  * @type {WeakMap<RenderTarget, FramebufferTexture>}
95
95
  * @private
96
96
  */
97
- this._textures = new WeakMap();
97
+ this._cacheTextures = new WeakMap();
98
98
 
99
99
  }
100
100
 
101
- getFrameBufferTexture( reference = null ) {
101
+ /**
102
+ * This methods returns a texture for the given render target reference.
103
+ *
104
+ * To avoid rendering errors, `ViewportTextureNode` must use unique framebuffer textures
105
+ * for different render contexts.
106
+ *
107
+ * @param {?RenderTarget} [reference=null] - The render target reference.
108
+ * @return {Texture} The framebuffer texture.
109
+ */
110
+ getTextureForReference( reference = null ) {
111
+
112
+ let defaultFramebuffer;
113
+ let cacheTextures;
114
+
115
+ if ( this.referenceNode ) {
116
+
117
+ defaultFramebuffer = this.referenceNode.defaultFramebuffer;
118
+ cacheTextures = this.referenceNode._cacheTextures;
119
+
120
+ } else {
102
121
 
103
- const defaultFramebuffer = this.referenceNode ? this.referenceNode.defaultFramebuffer : this.defaultFramebuffer;
122
+ defaultFramebuffer = this.defaultFramebuffer;
123
+ cacheTextures = this._cacheTextures;
124
+
125
+ }
104
126
 
105
127
  if ( reference === null ) {
106
128
 
@@ -108,15 +130,25 @@ class ViewportTextureNode extends TextureNode {
108
130
 
109
131
  }
110
132
 
111
- if ( this._textures.has( reference ) === false ) {
133
+ if ( cacheTextures.has( reference ) === false ) {
112
134
 
113
135
  const framebufferTexture = defaultFramebuffer.clone();
114
136
 
115
- this._textures.set( reference, framebufferTexture );
137
+ cacheTextures.set( reference, framebufferTexture );
116
138
 
117
139
  }
118
140
 
119
- return this._textures.get( reference );
141
+ return cacheTextures.get( reference );
142
+
143
+ }
144
+
145
+ updateReference( frame ) {
146
+
147
+ const renderTarget = frame.renderer.getRenderTarget();
148
+
149
+ this.value = this.getTextureForReference( renderTarget );
150
+
151
+ return this.value;
120
152
 
121
153
  }
122
154
 
@@ -137,7 +169,7 @@ class ViewportTextureNode extends TextureNode {
137
169
 
138
170
  //
139
171
 
140
- const framebufferTexture = this.getFrameBufferTexture( renderTarget );
172
+ const framebufferTexture = this.getTextureForReference( renderTarget );
141
173
 
142
174
  if ( framebufferTexture.image.width !== _size.width || framebufferTexture.image.height !== _size.height ) {
143
175
 
@@ -156,8 +188,6 @@ class ViewportTextureNode extends TextureNode {
156
188
 
157
189
  framebufferTexture.generateMipmaps = currentGenerateMipmaps;
158
190
 
159
- this.value = framebufferTexture;
160
-
161
191
  }
162
192
 
163
193
  clone() {
@@ -1,6 +1,7 @@
1
1
  import { positionView } from '../accessors/Position.js';
2
2
  import { smoothstep } from '../math/MathNode.js';
3
3
  import { Fn, output, vec4 } from '../tsl/TSLBase.js';
4
+ import { warn } from '../../utils.js';
4
5
 
5
6
  /**
6
7
  * Returns a node that represents the `z` coordinate in view space
@@ -91,7 +92,7 @@ export const fog = Fn( ( [ color, factor ] ) => {
91
92
  */
92
93
  export function rangeFog( color, near, far ) { // @deprecated, r171
93
94
 
94
- console.warn( 'THREE.TSL: "rangeFog( color, near, far )" is deprecated. Use "fog( color, rangeFogFactor( near, far ) )" instead.' );
95
+ warn( 'TSL: "rangeFog( color, near, far )" is deprecated. Use "fog( color, rangeFogFactor( near, far ) )" instead.' );
95
96
  return fog( color, rangeFogFactor( near, far ) );
96
97
 
97
98
  }
@@ -107,7 +108,7 @@ export function rangeFog( color, near, far ) { // @deprecated, r171
107
108
  */
108
109
  export function densityFog( color, density ) { // @deprecated, r171
109
110
 
110
- console.warn( 'THREE.TSL: "densityFog( color, density )" is deprecated. Use "fog( color, densityFogFactor( density ) )" instead.' );
111
+ warn( 'TSL: "densityFog( color, density )" is deprecated. Use "fog( color, densityFogFactor( density ) )" instead.' );
111
112
  return fog( color, densityFogFactor( density ) );
112
113
 
113
114
  }
@@ -0,0 +1,52 @@
1
+ import BRDF_GGX from './BRDF_GGX.js';
2
+ import DFGApprox from './DFGApprox.js';
3
+ import { normalView } from '../../accessors/Normal.js';
4
+ import { positionViewDirection } from '../../accessors/Position.js';
5
+ import { EPSILON } from '../../math/MathNode.js';
6
+ import { Fn, float } from '../../tsl/TSLBase.js';
7
+
8
+ // GGX BRDF with multi-scattering energy compensation for direct lighting
9
+ // This provides more accurate energy conservation, especially for rough materials
10
+ // Based on "Practical Multiple Scattering Compensation for Microfacet Models"
11
+ // https://blog.selfshadow.com/publications/turquin/ms_comp_final.pdf
12
+ const BRDF_GGX_Multiscatter = /*@__PURE__*/ Fn( ( { lightDirection, f0, f90, roughness: _roughness, f, USE_IRIDESCENCE, USE_ANISOTROPY } ) => {
13
+
14
+ // Single-scattering BRDF (standard GGX)
15
+ const singleScatter = BRDF_GGX( { lightDirection, f0, f90, roughness: _roughness, f, USE_IRIDESCENCE, USE_ANISOTROPY } );
16
+
17
+ // Multi-scattering compensation
18
+ const dotNL = normalView.dot( lightDirection ).clamp();
19
+ const dotNV = normalView.dot( positionViewDirection ).clamp();
20
+
21
+ // Precomputed DFG values for view and light directions
22
+ const dfgV = DFGApprox( { roughness: _roughness, dotNV } );
23
+ const dfgL = DFGApprox( { roughness: _roughness, dotNV: dotNL } );
24
+
25
+ // Single-scattering energy for view and light
26
+ const FssEss_V = f0.mul( dfgV.x ).add( f90.mul( dfgV.y ) );
27
+ const FssEss_L = f0.mul( dfgL.x ).add( f90.mul( dfgL.y ) );
28
+
29
+ const Ess_V = dfgV.x.add( dfgV.y );
30
+ const Ess_L = dfgL.x.add( dfgL.y );
31
+
32
+ // Energy lost to multiple scattering
33
+ const Ems_V = float( 1.0 ).sub( Ess_V );
34
+ const Ems_L = float( 1.0 ).sub( Ess_L );
35
+
36
+ // Average Fresnel reflectance
37
+ const Favg = f0.add( f0.oneMinus().mul( 0.047619 ) ); // 1/21
38
+
39
+ // Multiple scattering contribution
40
+ // Uses geometric mean of view and light contributions for better energy distribution
41
+ const Fms = FssEss_V.mul( FssEss_L ).mul( Favg ).div( float( 1.0 ).sub( Ems_V.mul( Ems_L ).mul( Favg ).mul( Favg ) ).add( EPSILON ) );
42
+
43
+ // Energy compensation factor
44
+ const compensationFactor = Ems_V.mul( Ems_L );
45
+
46
+ const multiScatter = Fms.mul( compensationFactor );
47
+
48
+ return singleScatter.add( multiScatter );
49
+
50
+ } );
51
+
52
+ export default BRDF_GGX_Multiscatter;
@@ -1,30 +1,71 @@
1
- import { Fn, vec2, vec4 } from '../../tsl/TSLBase.js';
1
+ import { Fn, vec2 } from '../../tsl/TSLBase.js';
2
+ import { texture } from '../../accessors/TextureNode.js';
2
3
 
3
- // Analytical approximation of the DFG LUT, one half of the
4
- // split-sum approximation used in indirect specular lighting.
5
- // via 'environmentBRDF' from "Physically Based Shading on Mobile"
6
- // https://www.unrealengine.com/blog/physically-based-shading-on-mobile
7
- const DFGApprox = /*@__PURE__*/ Fn( ( { roughness, dotNV } ) => {
4
+ import { DataTexture } from '../../../textures/DataTexture.js';
5
+ import { RGFormat, HalfFloatType, LinearFilter, ClampToEdgeWrapping } from '../../../constants.js';
6
+
7
+ /**
8
+ * Precomputed DFG LUT for Image-Based Lighting
9
+ * Resolution: 32x32
10
+ * Samples: 4096 per texel
11
+ * Format: RG16F (2 half floats per texel: scale, bias)
12
+ */
13
+
14
+ const DATA = new Uint16Array( [
15
+ 0x2cd9, 0x3b64, 0x2d0e, 0x3b43, 0x2e20, 0x3aa7, 0x3061, 0x39fb, 0x325e, 0x397c, 0x3454, 0x3908, 0x357d, 0x3893, 0x3698, 0x381e, 0x379d, 0x375b, 0x3845, 0x3689, 0x38af, 0x35ca, 0x390d, 0x351e, 0x395f, 0x3484, 0x39a8, 0x33f9, 0x39e6, 0x330a, 0x3a1c, 0x3239, 0x3a4b, 0x3183, 0x3a73, 0x30e5, 0x3a95, 0x305b, 0x3ab1, 0x2fc6, 0x3ac9, 0x2ef7, 0x3ade, 0x2e43, 0x3aee, 0x2da7, 0x3afc, 0x2d1f, 0x3b07, 0x2ca9, 0x3b10, 0x2c42, 0x3b17, 0x2bd1, 0x3b1c, 0x2b34, 0x3b1f, 0x2aaa, 0x3b22, 0x2a31, 0x3b23, 0x29c7, 0x3b23, 0x2968,
16
+ 0x32d4, 0x3a4b, 0x32dc, 0x3a45, 0x3308, 0x3a26, 0x3378, 0x39d0, 0x3425, 0x394a, 0x34c9, 0x38be, 0x359c, 0x383e, 0x3688, 0x3796, 0x3778, 0x36c4, 0x382f, 0x3603, 0x3898, 0x3553, 0x38f7, 0x34b3, 0x394b, 0x3424, 0x3994, 0x334c, 0x39d3, 0x326c, 0x3a08, 0x31a9, 0x3a35, 0x30fe, 0x3a5a, 0x306a, 0x3a78, 0x2fd1, 0x3a90, 0x2ef1, 0x3aa2, 0x2e2e, 0x3ab0, 0x2d86, 0x3aba, 0x2cf3, 0x3ac1, 0x2c74, 0x3ac4, 0x2c05, 0x3ac4, 0x2b49, 0x3ac2, 0x2aa1, 0x3abd, 0x2a0c, 0x3ab7, 0x298b, 0x3aaf, 0x2918, 0x3aa6, 0x28b3, 0x3a9b, 0x285a,
17
+ 0x3559, 0x3954, 0x355a, 0x3951, 0x3566, 0x3944, 0x3582, 0x391e, 0x35b6, 0x38d3, 0x360a, 0x386a, 0x3684, 0x37ed, 0x3720, 0x370d, 0x37d3, 0x3641, 0x3847, 0x3588, 0x38a3, 0x34e2, 0x38fa, 0x344d, 0x3948, 0x3391, 0x398d, 0x32a6, 0x39c8, 0x31d6, 0x39fa, 0x3121, 0x3a22, 0x3082, 0x3a43, 0x2ff0, 0x3a5c, 0x2f01, 0x3a6f, 0x2e32, 0x3a7c, 0x2d7e, 0x3a84, 0x2ce2, 0x3a87, 0x2c5b, 0x3a87, 0x2bcc, 0x3a83, 0x2b00, 0x3a7b, 0x2a4e, 0x3a71, 0x29b3, 0x3a66, 0x292c, 0x3a58, 0x28b4, 0x3a4b, 0x284b, 0x3a3d, 0x27dc, 0x3a2e, 0x2739,
18
+ 0x3709, 0x387c, 0x370a, 0x387b, 0x3710, 0x3874, 0x3720, 0x385f, 0x373d, 0x3834, 0x376a, 0x37e1, 0x37ac, 0x3732, 0x3805, 0x3675, 0x383f, 0x35bc, 0x3883, 0x3511, 0x38cb, 0x3476, 0x3912, 0x33d8, 0x3955, 0x32e2, 0x3991, 0x3208, 0x39c6, 0x3149, 0x39f1, 0x30a1, 0x3a15, 0x300f, 0x3a30, 0x2f21, 0x3a44, 0x2e45, 0x3a51, 0x2d87, 0x3a59, 0x2ce2, 0x3a5b, 0x2c53, 0x3a58, 0x2bb0, 0x3a52, 0x2ada, 0x3a49, 0x2a1f, 0x3a40, 0x297d, 0x3a34, 0x28f0, 0x3a25, 0x2874, 0x3a13, 0x2807, 0x3a00, 0x274e, 0x39eb, 0x26a6, 0x39d5, 0x2611,
19
+ 0x3840, 0x3780, 0x3840, 0x377e, 0x3842, 0x3776, 0x3846, 0x375e, 0x384f, 0x372a, 0x385b, 0x36d3, 0x386c, 0x3659, 0x3885, 0x35c7, 0x38a8, 0x352d, 0x38d4, 0x3497, 0x3906, 0x340c, 0x393b, 0x331a, 0x3970, 0x323a, 0x39a0, 0x3172, 0x39cb, 0x30c3, 0x39ef, 0x302a, 0x3a0c, 0x2f4a, 0x3a21, 0x2e63, 0x3a2f, 0x2d9b, 0x3a37, 0x2ced, 0x3a39, 0x2c57, 0x3a37, 0x2baa, 0x3a34, 0x2ac9, 0x3a2c, 0x2a05, 0x3a20, 0x295d, 0x3a11, 0x28ca, 0x39ff, 0x2849, 0x39eb, 0x27b2, 0x39d5, 0x26ed, 0x39be, 0x2640, 0x39a5, 0x25aa, 0x398b, 0x2523,
20
+ 0x38e2, 0x363b, 0x38e2, 0x363b, 0x38e3, 0x3635, 0x38e6, 0x3626, 0x38ea, 0x3606, 0x38f0, 0x35cd, 0x38f8, 0x3579, 0x3903, 0x350e, 0x3915, 0x3495, 0x392d, 0x3418, 0x394c, 0x3340, 0x3970, 0x3261, 0x3995, 0x3197, 0x39b8, 0x30e4, 0x39d8, 0x3046, 0x39f3, 0x2f76, 0x3a08, 0x2e86, 0x3a16, 0x2db5, 0x3a1e, 0x2cff, 0x3a22, 0x2c61, 0x3a24, 0x2bb3, 0x3a20, 0x2ac7, 0x3a17, 0x29fc, 0x3a0a, 0x294c, 0x39fa, 0x28b2, 0x39e7, 0x282e, 0x39d1, 0x2773, 0x39b9, 0x26a9, 0x399f, 0x25fa, 0x3985, 0x255f, 0x3968, 0x24d6, 0x394a, 0x245d,
21
+ 0x396e, 0x3524, 0x396e, 0x3524, 0x396e, 0x3520, 0x396f, 0x3517, 0x3971, 0x3502, 0x3973, 0x34dd, 0x3975, 0x34a5, 0x3978, 0x3458, 0x397e, 0x33f9, 0x3987, 0x3332, 0x3997, 0x326b, 0x39aa, 0x31ac, 0x39c0, 0x30fb, 0x39d7, 0x305c, 0x39eb, 0x2f9e, 0x39fc, 0x2ea7, 0x3a07, 0x2dcf, 0x3a0f, 0x2d13, 0x3a16, 0x2c70, 0x3a17, 0x2bc4, 0x3a14, 0x2ad0, 0x3a0a, 0x29fc, 0x39fd, 0x2945, 0x39ed, 0x28a6, 0x39d9, 0x281d, 0x39c2, 0x274a, 0x39a9, 0x267c, 0x398e, 0x25c7, 0x3971, 0x2528, 0x3952, 0x249e, 0x3931, 0x2425, 0x3910, 0x2374,
22
+ 0x39e5, 0x3436, 0x39e5, 0x3435, 0x39e5, 0x3434, 0x39e5, 0x342e, 0x39e5, 0x3420, 0x39e5, 0x3408, 0x39e3, 0x33c4, 0x39e1, 0x3359, 0x39df, 0x32d3, 0x39de, 0x323a, 0x39e1, 0x319a, 0x39e7, 0x30fb, 0x39f0, 0x3065, 0x39f9, 0x2fb6, 0x3a02, 0x2ec0, 0x3a08, 0x2de6, 0x3a0d, 0x2d26, 0x3a12, 0x2c7e, 0x3a13, 0x2bda, 0x3a0e, 0x2adc, 0x3a05, 0x2a02, 0x39f8, 0x2945, 0x39e7, 0x28a1, 0x39d3, 0x2813, 0x39bc, 0x2730, 0x39a2, 0x265c, 0x3985, 0x25a3, 0x3966, 0x2501, 0x3945, 0x2475, 0x3923, 0x23f3, 0x3901, 0x231c, 0x38dd, 0x225e,
23
+ 0x3a4b, 0x32d6, 0x3a4a, 0x32d6, 0x3a4a, 0x32d4, 0x3a4a, 0x32cc, 0x3a48, 0x32bb, 0x3a47, 0x329d, 0x3a43, 0x326b, 0x3a3d, 0x3222, 0x3a36, 0x31c2, 0x3a2e, 0x314f, 0x3a28, 0x30d2, 0x3a23, 0x3052, 0x3a20, 0x2fab, 0x3a1e, 0x2ec2, 0x3a1b, 0x2def, 0x3a19, 0x2d31, 0x3a1a, 0x2c89, 0x3a18, 0x2beb, 0x3a11, 0x2aea, 0x3a07, 0x2a0a, 0x39fa, 0x2948, 0x39e9, 0x28a1, 0x39d4, 0x280f, 0x39bd, 0x2721, 0x39a2, 0x2647, 0x3985, 0x258b, 0x3964, 0x24e5, 0x3942, 0x2455, 0x391f, 0x23b3, 0x38fb, 0x22d8, 0x38d4, 0x2219, 0x38ad, 0x2172,
24
+ 0x3aa0, 0x3180, 0x3aa0, 0x3180, 0x3aa0, 0x317f, 0x3a9f, 0x317b, 0x3a9d, 0x3170, 0x3a99, 0x315d, 0x3a95, 0x313d, 0x3a8d, 0x310c, 0x3a82, 0x30ca, 0x3a76, 0x3077, 0x3a69, 0x3019, 0x3a5c, 0x2f68, 0x3a4f, 0x2e9e, 0x3a42, 0x2dde, 0x3a37, 0x2d2b, 0x3a30, 0x2c89, 0x3a29, 0x2bef, 0x3a1f, 0x2af0, 0x3a12, 0x2a0f, 0x3a03, 0x294a, 0x39f1, 0x28a0, 0x39dc, 0x280c, 0x39c5, 0x2717, 0x39a9, 0x2638, 0x398b, 0x2578, 0x396a, 0x24d0, 0x3947, 0x243f, 0x3923, 0x2380, 0x38fc, 0x22a4, 0x38d4, 0x21e4, 0x38ac, 0x213c, 0x3883, 0x20a8,
25
+ 0x3ae8, 0x3062, 0x3ae8, 0x3062, 0x3ae7, 0x3061, 0x3ae6, 0x305f, 0x3ae4, 0x305a, 0x3ae0, 0x304f, 0x3ada, 0x303b, 0x3ad1, 0x301b, 0x3ac5, 0x2fdd, 0x3ab6, 0x2f6a, 0x3aa4, 0x2ede, 0x3a91, 0x2e45, 0x3a7c, 0x2da5, 0x3a67, 0x2d0a, 0x3a57, 0x2c77, 0x3a48, 0x2bdc, 0x3a38, 0x2ae5, 0x3a27, 0x2a0a, 0x3a16, 0x2947, 0x3a02, 0x289d, 0x39eb, 0x2808, 0x39d3, 0x270d, 0x39b6, 0x262b, 0x3997, 0x256a, 0x3976, 0x24bf, 0x3952, 0x242b, 0x392d, 0x2358, 0x3904, 0x227a, 0x38db, 0x21b8, 0x38b2, 0x2110, 0x3887, 0x207d, 0x385b, 0x1ff6,
26
+ 0x3b23, 0x2ee8, 0x3b23, 0x2ee8, 0x3b22, 0x2ee8, 0x3b21, 0x2ee7, 0x3b1f, 0x2ee3, 0x3b1a, 0x2ed6, 0x3b14, 0x2ec1, 0x3b0b, 0x2e99, 0x3afe, 0x2e60, 0x3aee, 0x2e12, 0x3ad8, 0x2dad, 0x3ac1, 0x2d3d, 0x3aa5, 0x2cc3, 0x3a8b, 0x2c48, 0x3a76, 0x2ba2, 0x3a60, 0x2ac0, 0x3a49, 0x29f2, 0x3a32, 0x2938, 0x3a1b, 0x2893, 0x3a02, 0x27ff, 0x39e8, 0x26ff, 0x39ca, 0x261e, 0x39aa, 0x255b, 0x3988, 0x24b0, 0x3964, 0x241c, 0x393d, 0x2336, 0x3913, 0x2257, 0x38e9, 0x2195, 0x38be, 0x20eb, 0x3891, 0x2059, 0x3864, 0x1fae, 0x3837, 0x1ecd,
27
+ 0x3b54, 0x2d61, 0x3b54, 0x2d61, 0x3b53, 0x2d61, 0x3b52, 0x2d62, 0x3b4f, 0x2d61, 0x3b4b, 0x2d5c, 0x3b45, 0x2d51, 0x3b3b, 0x2d3d, 0x3b2e, 0x2d1a, 0x3b1d, 0x2ce7, 0x3b06, 0x2ca3, 0x3aeb, 0x2c52, 0x3acb, 0x2bee, 0x3ab0, 0x2b31, 0x3a94, 0x2a74, 0x3a77, 0x29bf, 0x3a5a, 0x2915, 0x3a3f, 0x287a, 0x3a22, 0x27de, 0x3a05, 0x26e4, 0x39e5, 0x2609, 0x39c3, 0x2547, 0x39a0, 0x249f, 0x397b, 0x240c, 0x3953, 0x2314, 0x3928, 0x2238, 0x38fd, 0x2175, 0x38d0, 0x20cb, 0x38a2, 0x2038, 0x3873, 0x1f71, 0x3844, 0x1e90, 0x3815, 0x1dce,
28
+ 0x3b7c, 0x2c22, 0x3b7c, 0x2c22, 0x3b7b, 0x2c23, 0x3b7a, 0x2c25, 0x3b77, 0x2c27, 0x3b73, 0x2c26, 0x3b6d, 0x2c23, 0x3b64, 0x2c1a, 0x3b57, 0x2c07, 0x3b46, 0x2bd1, 0x3b2e, 0x2b79, 0x3b0f, 0x2b07, 0x3aef, 0x2a86, 0x3ad1, 0x29f8, 0x3ab0, 0x2967, 0x3a8e, 0x28d7, 0x3a6d, 0x284e, 0x3a4c, 0x279f, 0x3a2b, 0x26b7, 0x3a08, 0x25e5, 0x39e4, 0x252c, 0x39be, 0x2488, 0x3998, 0x23f0, 0x396f, 0x22f2, 0x3943, 0x2215, 0x3917, 0x2155, 0x38e8, 0x20ae, 0x38b9, 0x201c, 0x3888, 0x1f38, 0x3857, 0x1e5a, 0x3826, 0x1d9a, 0x37eb, 0x1cf0,
29
+ 0x3b9c, 0x2a43, 0x3b9c, 0x2a43, 0x3b9b, 0x2a46, 0x3b9a, 0x2a4a, 0x3b98, 0x2a50, 0x3b93, 0x2a54, 0x3b8e, 0x2a59, 0x3b85, 0x2a56, 0x3b79, 0x2a45, 0x3b67, 0x2a24, 0x3b4f, 0x29ee, 0x3b2f, 0x29a4, 0x3b10, 0x294b, 0x3aef, 0x28e5, 0x3ac9, 0x2877, 0x3aa4, 0x2809, 0x3a7e, 0x2739, 0x3a59, 0x266d, 0x3a34, 0x25af, 0x3a0c, 0x2503, 0x39e4, 0x2468, 0x39bb, 0x23bb, 0x3990, 0x22c6, 0x3963, 0x21f0, 0x3936, 0x2133, 0x3906, 0x208f, 0x38d5, 0x1ffd, 0x38a3, 0x1f04, 0x3870, 0x1e28, 0x383d, 0x1d69, 0x380b, 0x1cc3, 0x37b0, 0x1c32,
30
+ 0x3bb5, 0x28aa, 0x3bb5, 0x28ab, 0x3bb5, 0x28ad, 0x3bb4, 0x28b2, 0x3bb2, 0x28b9, 0x3bae, 0x28c2, 0x3ba8, 0x28ca, 0x3ba0, 0x28d1, 0x3b94, 0x28cd, 0x3b83, 0x28c1, 0x3b6a, 0x28a3, 0x3b4b, 0x2876, 0x3b2d, 0x283d, 0x3b09, 0x27ea, 0x3ae1, 0x274b, 0x3ab9, 0x26a6, 0x3a8f, 0x25fe, 0x3a67, 0x255d, 0x3a3d, 0x24c5, 0x3a11, 0x2439, 0x39e6, 0x2371, 0x39b9, 0x228d, 0x398a, 0x21c1, 0x395a, 0x210b, 0x3929, 0x206c, 0x38f7, 0x1fc1, 0x38c3, 0x1ecb, 0x388f, 0x1df6, 0x385a, 0x1d3a, 0x3825, 0x1c99, 0x37e1, 0x1c08, 0x3779, 0x1b1b,
31
+ 0x3bc9, 0x26d3, 0x3bc9, 0x26d4, 0x3bc9, 0x26d9, 0x3bc8, 0x26e3, 0x3bc6, 0x26ef, 0x3bc2, 0x2705, 0x3bbd, 0x271a, 0x3bb6, 0x2731, 0x3baa, 0x273c, 0x3b9a, 0x273d, 0x3b81, 0x2726, 0x3b65, 0x26f7, 0x3b46, 0x26af, 0x3b20, 0x2650, 0x3af7, 0x25e1, 0x3acd, 0x256a, 0x3aa1, 0x24eb, 0x3a75, 0x246f, 0x3a46, 0x23ee, 0x3a17, 0x230d, 0x39e9, 0x223e, 0x39b7, 0x2183, 0x3985, 0x20d8, 0x3953, 0x2043, 0x391e, 0x1f7a, 0x38e9, 0x1e8d, 0x38b3, 0x1dbf, 0x387c, 0x1d0b, 0x3845, 0x1c6c, 0x380e, 0x1bc4, 0x37b0, 0x1ad2, 0x3745, 0x19fd,
32
+ 0x3bd9, 0x24e4, 0x3bd9, 0x24e5, 0x3bd9, 0x24e8, 0x3bd8, 0x24f2, 0x3bd5, 0x24fe, 0x3bd2, 0x2512, 0x3bce, 0x252b, 0x3bc6, 0x2544, 0x3bbc, 0x255a, 0x3bac, 0x256b, 0x3b93, 0x2569, 0x3b7a, 0x2557, 0x3b5b, 0x252f, 0x3b34, 0x24f7, 0x3b0c, 0x24ad, 0x3adf, 0x2458, 0x3ab1, 0x23f8, 0x3a82, 0x233f, 0x3a4f, 0x2286, 0x3a1e, 0x21d5, 0x39eb, 0x2130, 0x39b6, 0x2098, 0x3982, 0x200e, 0x394b, 0x1f25, 0x3914, 0x1e45, 0x38dc, 0x1d83, 0x38a3, 0x1cd6, 0x386b, 0x1c3d, 0x3831, 0x1b71, 0x37f2, 0x1a87, 0x3782, 0x19bc, 0x3714, 0x1909,
33
+ 0x3be5, 0x22d8, 0x3be5, 0x22d9, 0x3be4, 0x22df, 0x3be4, 0x22ef, 0x3be1, 0x2305, 0x3bde, 0x232a, 0x3bda, 0x2358, 0x3bd4, 0x2392, 0x3bcb, 0x23ca, 0x3bbb, 0x23f4, 0x3ba3, 0x2405, 0x3b8c, 0x2405, 0x3b6c, 0x23ec, 0x3b47, 0x23ae, 0x3b1d, 0x2353, 0x3af0, 0x22e2, 0x3ac0, 0x2261, 0x3a8e, 0x21d9, 0x3a5a, 0x214e, 0x3a26, 0x20c7, 0x39ee, 0x2045, 0x39b7, 0x1f97, 0x397f, 0x1eba, 0x3945, 0x1df0, 0x390b, 0x1d3a, 0x38d0, 0x1c9a, 0x3895, 0x1c0a, 0x385a, 0x1b18, 0x381f, 0x1a39, 0x37c9, 0x1975, 0x3756, 0x18cc, 0x36e6, 0x1836,
34
+ 0x3bed, 0x20a8, 0x3bed, 0x20a9, 0x3bed, 0x20ae, 0x3bed, 0x20bb, 0x3beb, 0x20cf, 0x3be8, 0x20ef, 0x3be4, 0x2119, 0x3bde, 0x214f, 0x3bd6, 0x2189, 0x3bc6, 0x21b8, 0x3bb1, 0x21de, 0x3b9a, 0x21f2, 0x3b7b, 0x21f2, 0x3b57, 0x21d8, 0x3b2d, 0x21a4, 0x3b00, 0x215f, 0x3acf, 0x2108, 0x3a99, 0x20a8, 0x3a64, 0x2043, 0x3a2c, 0x1fba, 0x39f2, 0x1ef3, 0x39b8, 0x1e36, 0x397c, 0x1d86, 0x3940, 0x1ce5, 0x3903, 0x1c52, 0x38c6, 0x1b9e, 0x3888, 0x1ab3, 0x384a, 0x19e4, 0x380e, 0x192b, 0x37a3, 0x188b, 0x372d, 0x17f7, 0x36ba, 0x1701,
35
+ 0x3bf4, 0x1e23, 0x3bf4, 0x1e25, 0x3bf4, 0x1e2d, 0x3bf3, 0x1e41, 0x3bf1, 0x1e64, 0x3bef, 0x1e9c, 0x3beb, 0x1ee1, 0x3be6, 0x1f40, 0x3bde, 0x1fa7, 0x3bce, 0x2001, 0x3bbd, 0x202f, 0x3ba6, 0x204e, 0x3b88, 0x205f, 0x3b64, 0x205b, 0x3b3b, 0x2044, 0x3b0e, 0x201f, 0x3adb, 0x1fcf, 0x3aa6, 0x1f4e, 0x3a6e, 0x1ec1, 0x3a33, 0x1e2b, 0x39f7, 0x1d95, 0x39ba, 0x1d06, 0x397b, 0x1c7d, 0x393c, 0x1bfc, 0x38fc, 0x1b13, 0x38bc, 0x1a40, 0x387c, 0x1983, 0x383c, 0x18da, 0x37fa, 0x1842, 0x377f, 0x177f, 0x3706, 0x1695, 0x3691, 0x15c8,
36
+ 0x3bf8, 0x1bca, 0x3bf8, 0x1bcc, 0x3bf8, 0x1bd8, 0x3bf8, 0x1bf7, 0x3bf6, 0x1c1b, 0x3bf4, 0x1c45, 0x3bf1, 0x1c83, 0x3bec, 0x1cce, 0x3be4, 0x1d21, 0x3bd5, 0x1d78, 0x3bc5, 0x1dd1, 0x3bb0, 0x1e17, 0x3b93, 0x1e4a, 0x3b70, 0x1e5f, 0x3b48, 0x1e57, 0x3b1b, 0x1e35, 0x3ae7, 0x1df6, 0x3ab2, 0x1da4, 0x3a77, 0x1d44, 0x3a3a, 0x1cdb, 0x39fc, 0x1c6e, 0x39bb, 0x1c03, 0x397a, 0x1b35, 0x3938, 0x1a72, 0x38f5, 0x19bb, 0x38b3, 0x1914, 0x3870, 0x187d, 0x382e, 0x17eb, 0x37db, 0x16f9, 0x375c, 0x1621, 0x36e1, 0x1565, 0x3669, 0x14be,
37
+ 0x3bfb, 0x18b9, 0x3bfb, 0x18ba, 0x3bfb, 0x18c3, 0x3bfb, 0x18da, 0x3bf9, 0x190a, 0x3bf7, 0x1948, 0x3bf5, 0x19ac, 0x3bf0, 0x1a20, 0x3be9, 0x1ab3, 0x3bdb, 0x1b49, 0x3bcd, 0x1be6, 0x3bb7, 0x1c34, 0x3b9c, 0x1c6d, 0x3b7a, 0x1c8e, 0x3b54, 0x1c9e, 0x3b26, 0x1c96, 0x3af2, 0x1c75, 0x3abc, 0x1c47, 0x3a80, 0x1c09, 0x3a42, 0x1b85, 0x3a01, 0x1aec, 0x39be, 0x1a50, 0x397a, 0x19b5, 0x3935, 0x1921, 0x38f0, 0x1895, 0x38aa, 0x1814, 0x3866, 0x173a, 0x3821, 0x1665, 0x37be, 0x15a4, 0x373c, 0x14f9, 0x36be, 0x1460, 0x3644, 0x13b3,
38
+ 0x3bfd, 0x156b, 0x3bfd, 0x156c, 0x3bfd, 0x1578, 0x3bfd, 0x1598, 0x3bfc, 0x15dd, 0x3bfa, 0x163c, 0x3bf7, 0x16cb, 0x3bf3, 0x177b, 0x3beb, 0x1833, 0x3be0, 0x18ad, 0x3bd2, 0x192e, 0x3bbd, 0x19a6, 0x3ba4, 0x1a0c, 0x3b83, 0x1a5a, 0x3b5d, 0x1a8c, 0x3b30, 0x1a9b, 0x3afd, 0x1a86, 0x3ac6, 0x1a5c, 0x3a89, 0x1a11, 0x3a49, 0x19b7, 0x3a06, 0x194f, 0x39c1, 0x18e3, 0x397a, 0x1873, 0x3933, 0x1805, 0x38eb, 0x173a, 0x38a3, 0x1676, 0x385c, 0x15bf, 0x3816, 0x1519, 0x37a2, 0x1482, 0x371d, 0x13f7, 0x369c, 0x1306, 0x3620, 0x1231,
39
+ 0x3bff, 0x11cb, 0x3bff, 0x11cd, 0x3bfe, 0x11dd, 0x3bfe, 0x1219, 0x3bfd, 0x126b, 0x3bfb, 0x12e9, 0x3bf9, 0x13c5, 0x3bf5, 0x1460, 0x3bee, 0x150f, 0x3be3, 0x15c9, 0x3bd6, 0x168a, 0x3bc3, 0x174f, 0x3baa, 0x1806, 0x3b8b, 0x184f, 0x3b66, 0x1888, 0x3b39, 0x18a6, 0x3b07, 0x18ad, 0x3acf, 0x189c, 0x3a92, 0x1876, 0x3a50, 0x1840, 0x3a0c, 0x17fd, 0x39c4, 0x176a, 0x397b, 0x16ce, 0x3931, 0x1634, 0x38e6, 0x1599, 0x389c, 0x1508, 0x3852, 0x147f, 0x380a, 0x1401, 0x3788, 0x131c, 0x36ff, 0x124a, 0x367c, 0x1190, 0x35fe, 0x10ea,
40
+ 0x3bff, 0x0daa, 0x3bff, 0x0dad, 0x3bff, 0x0dc0, 0x3bff, 0x0e0e, 0x3bfe, 0x0e87, 0x3bfc, 0x0f14, 0x3bfb, 0x1029, 0x3bf7, 0x10d1, 0x3bf0, 0x11d3, 0x3be6, 0x12c9, 0x3bd9, 0x13fc, 0x3bc7, 0x1499, 0x3bb0, 0x152a, 0x3b92, 0x15ab, 0x3b6e, 0x1615, 0x3b42, 0x165a, 0x3b10, 0x1681, 0x3ad8, 0x1683, 0x3a9a, 0x1665, 0x3a57, 0x1629, 0x3a11, 0x15dd, 0x39c8, 0x1580, 0x397c, 0x1518, 0x3930, 0x14ae, 0x38e3, 0x1441, 0x3896, 0x13b1, 0x384a, 0x12e9, 0x37ff, 0x122f, 0x376f, 0x1182, 0x36e3, 0x10e5, 0x365e, 0x1057, 0x35de, 0x0fac,
41
+ 0x3c00, 0x08ea, 0x3c00, 0x08ed, 0x3c00, 0x0902, 0x3c00, 0x0961, 0x3bff, 0x09f3, 0x3bfd, 0x0abc, 0x3bfb, 0x0c1f, 0x3bf8, 0x0d15, 0x3bf1, 0x0e5b, 0x3be8, 0x0fb4, 0x3bdc, 0x10b0, 0x3bcb, 0x1190, 0x3bb5, 0x126c, 0x3b97, 0x132c, 0x3b74, 0x13de, 0x3b4a, 0x1432, 0x3b18, 0x145e, 0x3ae0, 0x1472, 0x3aa2, 0x146f, 0x3a5f, 0x1456, 0x3a17, 0x142e, 0x39cc, 0x13ee, 0x397e, 0x136b, 0x392f, 0x12e1, 0x38df, 0x124f, 0x3890, 0x11bd, 0x3842, 0x1131, 0x37eb, 0x10ac, 0x3757, 0x102e, 0x36c9, 0x0f76, 0x3640, 0x0ea3, 0x35bf, 0x0de4,
42
+ 0x3c00, 0x039b, 0x3c00, 0x039d, 0x3c00, 0x03b2, 0x3c00, 0x041c, 0x3bff, 0x04be, 0x3bfd, 0x05d6, 0x3bfc, 0x0764, 0x3bf8, 0x08e2, 0x3bf2, 0x0a67, 0x3bea, 0x0c1b, 0x3bde, 0x0d41, 0x3bcd, 0x0e5f, 0x3bb8, 0x0f8c, 0x3b9c, 0x1057, 0x3b7a, 0x10e5, 0x3b51, 0x1155, 0x3b20, 0x11a5, 0x3ae8, 0x11da, 0x3aaa, 0x11ef, 0x3a66, 0x11e5, 0x3a1d, 0x11c1, 0x39d0, 0x1185, 0x3980, 0x113b, 0x392e, 0x10e5, 0x38dc, 0x1087, 0x388b, 0x1028, 0x383b, 0x0f94, 0x37d9, 0x0edb, 0x3741, 0x0e2c, 0x36af, 0x0d89, 0x3625, 0x0cf2, 0x35a1, 0x0c69,
43
+ 0x3c00, 0x0107, 0x3c00, 0x0108, 0x3c00, 0x0110, 0x3c00, 0x0145, 0x3bff, 0x0197, 0x3bfe, 0x0224, 0x3bfc, 0x030c, 0x3bf8, 0x0478, 0x3bf3, 0x062c, 0x3beb, 0x0833, 0x3be0, 0x0979, 0x3bd0, 0x0aeb, 0x3bbc, 0x0c3d, 0x3ba0, 0x0d01, 0x3b80, 0x0dbd, 0x3b57, 0x0e69, 0x3b27, 0x0eeb, 0x3af0, 0x0f53, 0x3ab1, 0x0f8a, 0x3a6c, 0x0f9f, 0x3a22, 0x0f8b, 0x39d4, 0x0f5b, 0x3982, 0x0f0f, 0x392f, 0x0eac, 0x38da, 0x0e3d, 0x3886, 0x0dc9, 0x3834, 0x0d51, 0x37c7, 0x0cd9, 0x372c, 0x0c65, 0x3697, 0x0bef, 0x360a, 0x0b20, 0x3585, 0x0a62,
44
+ 0x3c00, 0x0031, 0x3c00, 0x0031, 0x3c00, 0x0034, 0x3c00, 0x004b, 0x3bff, 0x006f, 0x3bfe, 0x00c9, 0x3bfc, 0x011b, 0x3bf9, 0x0207, 0x3bf4, 0x02d6, 0x3bec, 0x0415, 0x3be1, 0x0587, 0x3bd2, 0x0703, 0x3bbf, 0x087d, 0x3ba5, 0x096a, 0x3b85, 0x0a59, 0x3b5d, 0x0b32, 0x3b2e, 0x0bee, 0x3af7, 0x0c44, 0x3ab8, 0x0c7c, 0x3a73, 0x0c9c, 0x3a28, 0x0ca4, 0x39d8, 0x0c98, 0x3985, 0x0c77, 0x392f, 0x0c4a, 0x38d9, 0x0c10, 0x3882, 0x0ba0, 0x382e, 0x0b14, 0x37b6, 0x0a84, 0x3717, 0x09f5, 0x3680, 0x0969, 0x35f0, 0x08e6, 0x356a, 0x086a,
45
+ 0x3c00, 0x0004, 0x3c00, 0x0004, 0x3c00, 0x0004, 0x3c00, 0x000d, 0x3bff, 0x0021, 0x3bfe, 0x003b, 0x3bfd, 0x0070, 0x3bf9, 0x00c7, 0x3bf4, 0x012e, 0x3bed, 0x01c8, 0x3be3, 0x0274, 0x3bd4, 0x033b, 0x3bc1, 0x043a, 0x3ba8, 0x0534, 0x3b89, 0x0641, 0x3b62, 0x073b, 0x3b34, 0x0815, 0x3afd, 0x087c, 0x3abf, 0x08d0, 0x3a7a, 0x090a, 0x3a2e, 0x092c, 0x39dd, 0x0936, 0x3988, 0x0928, 0x3930, 0x0907, 0x38d7, 0x08d7, 0x387f, 0x089b, 0x3828, 0x0855, 0x37a7, 0x080b, 0x3704, 0x077b, 0x366a, 0x06e1, 0x35d8, 0x0649, 0x3550, 0x05b8,
46
+ 0x3c00, 0x0000, 0x3c00, 0x0000, 0x3c00, 0x0000, 0x3c00, 0x0003, 0x3bff, 0x0012, 0x3bfe, 0x001a, 0x3bfd, 0x0035, 0x3bfa, 0x0050, 0x3bf4, 0x0061, 0x3bed, 0x00a5, 0x3be4, 0x00ee, 0x3bd6, 0x0146, 0x3bc3, 0x01ab, 0x3bab, 0x0211, 0x3b8d, 0x028e, 0x3b67, 0x0303, 0x3b39, 0x0375, 0x3b04, 0x03e2, 0x3ac6, 0x0441, 0x3a80, 0x0492, 0x3a34, 0x04cd, 0x39e1, 0x04f2, 0x398b, 0x0504, 0x3931, 0x0502, 0x38d6, 0x04ec, 0x387c, 0x04c7, 0x3822, 0x0496, 0x3798, 0x045c, 0x36f2, 0x041a, 0x3655, 0x03d5, 0x35c1, 0x038e, 0x3537, 0x0347
47
+ ] );
8
48
 
9
- const c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
49
+ let lut = null;
50
+
51
+ const DFGApprox = /*@__PURE__*/ Fn( ( { roughness, dotNV } ) => {
10
52
 
11
- const c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
53
+ if ( lut === null ) {
12
54
 
13
- const r = roughness.mul( c0 ).add( c1 );
55
+ lut = new DataTexture( DATA, 32, 32, RGFormat, HalfFloatType );
56
+ lut.minFilter = LinearFilter;
57
+ lut.magFilter = LinearFilter;
58
+ lut.wrapS = ClampToEdgeWrapping;
59
+ lut.wrapT = ClampToEdgeWrapping;
60
+ lut.generateMipmaps = false;
61
+ lut.needsUpdate = true;
14
62
 
15
- const a004 = r.x.mul( r.x ).min( dotNV.mul( - 9.28 ).exp2() ).mul( r.x ).add( r.y );
63
+ }
16
64
 
17
- const fab = vec2( - 1.04, 1.04 ).mul( a004 ).add( r.zw );
65
+ const uv = vec2( roughness, dotNV );
18
66
 
19
- return fab;
67
+ return texture( lut, uv ).rg;
20
68
 
21
- } ).setLayout( {
22
- name: 'DFGApprox',
23
- type: 'vec2',
24
- inputs: [
25
- { name: 'roughness', type: 'float' },
26
- { name: 'dotNV', type: 'vec3' }
27
- ]
28
69
  } );
29
70
 
30
71
  export default DFGApprox;
@@ -4,6 +4,7 @@ import { MultiplyOperation, MixOperation, AddOperation } from '../../constants.j
4
4
  import { materialSpecularStrength, materialReflectivity } from '../accessors/MaterialNode.js';
5
5
  import { mix } from '../math/MathNode.js';
6
6
  import { vec4 } from '../tsl/TSLBase.js';
7
+ import { warn } from '../../utils.js';
7
8
 
8
9
  /**
9
10
  * Represents the lighting model for unlit materials. The only light contribution
@@ -85,7 +86,7 @@ class BasicLightingModel extends LightingModel {
85
86
  break;
86
87
 
87
88
  default:
88
- console.warn( 'THREE.BasicLightingModel: Unsupported .combine value:', material.combine );
89
+ warn( 'BasicLightingModel: Unsupported .combine value:', material.combine );
89
90
  break;
90
91
 
91
92
  }
@@ -1,5 +1,6 @@
1
1
  import BRDF_Lambert from './BSDF/BRDF_Lambert.js';
2
2
  import BRDF_GGX from './BSDF/BRDF_GGX.js';
3
+ import BRDF_GGX_Multiscatter from './BSDF/BRDF_GGX_Multiscatter.js';
3
4
  import DFGApprox from './BSDF/DFGApprox.js';
4
5
  import EnvironmentBRDF from './BSDF/EnvironmentBRDF.js';
5
6
  import F_Schlick from './BSDF/F_Schlick.js';
@@ -561,7 +562,7 @@ class PhysicalLightingModel extends LightingModel {
561
562
  const Ess = fab.x.add( fab.y );
562
563
  const Ems = Ess.oneMinus();
563
564
 
564
- const Favg = specularColor.add( specularColor.oneMinus().mul( 0.047619 ) ); // 1/21
565
+ const Favg = Fr.add( Fr.oneMinus().mul( 0.047619 ) ); // 1/21
565
566
  const Fms = FssEss.mul( Favg ).div( Ems.mul( Favg ).oneMinus() );
566
567
 
567
568
  singleScatter.addAssign( FssEss );
@@ -597,7 +598,7 @@ class PhysicalLightingModel extends LightingModel {
597
598
 
598
599
  reflectedLight.directDiffuse.addAssign( irradiance.mul( BRDF_Lambert( { diffuseColor: diffuseColor.rgb } ) ) );
599
600
 
600
- reflectedLight.directSpecular.addAssign( irradiance.mul( BRDF_GGX( { lightDirection, f0: specularColor, f90: 1, roughness, iridescence: this.iridescence, f: this.iridescenceFresnel, USE_IRIDESCENCE: this.iridescence, USE_ANISOTROPY: this.anisotropy } ) ) );
601
+ reflectedLight.directSpecular.addAssign( irradiance.mul( BRDF_GGX_Multiscatter( { lightDirection, f0: specularColor, f90: 1, roughness, f: this.iridescenceFresnel, USE_IRIDESCENCE: this.iridescence, USE_ANISOTROPY: this.anisotropy } ) ) );
601
602
 
602
603
  }
603
604
 
@@ -30,7 +30,7 @@ class VolumetricLightingModel extends LightingModel {
30
30
 
31
31
  start( builder ) {
32
32
 
33
- const { material, context } = builder;
33
+ const { material } = builder;
34
34
 
35
35
  const startPos = property( 'vec3' );
36
36
  const endPos = property( 'vec3' );
@@ -79,13 +79,13 @@ class VolumetricLightingModel extends LightingModel {
79
79
 
80
80
  linearDepthRay.assign( linearDepth( viewZToPerspectiveDepth( positionViewRay.z, cameraNear, cameraFar ) ) );
81
81
 
82
- context.sceneDepthNode = linearDepth( material.depthNode ).toVar();
82
+ builder.context.sceneDepthNode = linearDepth( material.depthNode ).toVar();
83
83
 
84
84
  }
85
85
 
86
- context.positionWorld = positionRay;
87
- context.shadowPositionWorld = positionRay;
88
- context.positionView = positionViewRay;
86
+ builder.context.positionWorld = positionRay;
87
+ builder.context.shadowPositionWorld = positionRay;
88
+ builder.context.positionView = positionViewRay;
89
89
 
90
90
  scatteringDensity.assign( 0 );
91
91
 
@@ -67,8 +67,11 @@ class RangeNode extends Node {
67
67
  */
68
68
  getVectorLength( builder ) {
69
69
 
70
- const minLength = builder.getTypeLength( getValueType( this.minNode.value ) );
71
- const maxLength = builder.getTypeLength( getValueType( this.maxNode.value ) );
70
+ const minNode = this.getConstNode( this.minNode );
71
+ const maxNode = this.getConstNode( this.maxNode );
72
+
73
+ const minLength = builder.getTypeLength( getValueType( minNode.value ) );
74
+ const maxLength = builder.getTypeLength( getValueType( maxNode.value ) );
72
75
 
73
76
  return minLength > maxLength ? minLength : maxLength;
74
77
 
@@ -86,6 +89,36 @@ class RangeNode extends Node {
86
89
 
87
90
  }
88
91
 
92
+ /**
93
+ * Returns a constant node from the given node by traversing it.
94
+ *
95
+ * @param {Node} node - The node to traverse.
96
+ * @returns {Node} The constant node, if found.
97
+ */
98
+ getConstNode( node ) {
99
+
100
+ let output = null;
101
+
102
+ node.traverse( n => {
103
+
104
+ if ( n.isConstNode === true ) {
105
+
106
+ output = n;
107
+
108
+ }
109
+
110
+ } );
111
+
112
+ if ( output === null ) {
113
+
114
+ throw new Error( 'THREE.TSL: No "ConstNode" found in node graph.' );
115
+
116
+ }
117
+
118
+ return output;
119
+
120
+ }
121
+
89
122
  setup( builder ) {
90
123
 
91
124
  const object = builder.object;
@@ -94,8 +127,11 @@ class RangeNode extends Node {
94
127
 
95
128
  if ( object.count > 1 ) {
96
129
 
97
- const minValue = this.minNode.value;
98
- const maxValue = this.maxNode.value;
130
+ const minNode = this.getConstNode( this.minNode );
131
+ const maxNode = this.getConstNode( this.maxNode );
132
+
133
+ const minValue = minNode.value;
134
+ const maxValue = maxNode.value;
99
135
 
100
136
  const minLength = builder.getTypeLength( getValueType( minValue ) );
101
137
  const maxLength = builder.getTypeLength( getValueType( maxValue ) );
@@ -1,5 +1,6 @@
1
1
  import Node from '../core/Node.js';
2
2
  import { nodeObject } from '../tsl/TSLBase.js';
3
+ import { warn } from '../../utils.js';
3
4
 
4
5
  /**
5
6
  * `ComputeBuiltinNode` represents a compute-scope builtin value that expose information
@@ -110,7 +111,7 @@ class ComputeBuiltinNode extends Node {
110
111
 
111
112
  } else {
112
113
 
113
- console.warn( `ComputeBuiltinNode: Compute built-in value ${builtinName} can not be accessed in the ${builder.shaderStage} stage` );
114
+ warn( `ComputeBuiltinNode: Compute built-in value ${builtinName} can not be accessed in the ${builder.shaderStage} stage` );
114
115
  return builder.generateConst( nodeType );
115
116
 
116
117
  }
@@ -1,6 +1,7 @@
1
1
  import Node from '../core/Node.js';
2
2
  import { NodeUpdateType } from '../core/constants.js';
3
3
  import { addMethodChaining, nodeObject } from '../tsl/TSLCore.js';
4
+ import { warn, error } from '../../utils.js';
4
5
 
5
6
  /**
6
7
  * TODO
@@ -53,7 +54,7 @@ class ComputeNode extends Node {
53
54
  /**
54
55
  * TODO
55
56
  *
56
- * @type {number}
57
+ * @type {number|Array<number>}
57
58
  */
58
59
  this.count = null;
59
60
 
@@ -90,6 +91,12 @@ class ComputeNode extends Node {
90
91
 
91
92
  }
92
93
 
94
+ /**
95
+ * TODO
96
+ *
97
+ * @param {number|Array<number>} count - Array with [ x, y, z ] values for dispatch or a single number for the count
98
+ * @return {ComputeNode}
99
+ */
93
100
  setCount( count ) {
94
101
 
95
102
  this.count = count;
@@ -98,6 +105,11 @@ class ComputeNode extends Node {
98
105
 
99
106
  }
100
107
 
108
+ /**
109
+ * TODO
110
+ *
111
+ * @return {number|Array<number>}
112
+ */
101
113
  getCount() {
102
114
 
103
115
  return this.count;
@@ -136,7 +148,7 @@ class ComputeNode extends Node {
136
148
  */
137
149
  label( name ) {
138
150
 
139
- console.warn( 'THREE.TSL: "label()" has been deprecated. Use "setName()" instead.' ); // @deprecated r179
151
+ warn( 'TSL: "label()" has been deprecated. Use "setName()" instead.' ); // @deprecated r179
140
152
 
141
153
  return this.setName( name );
142
154
 
@@ -230,7 +242,7 @@ export const computeKernel = ( node, workgroupSize = [ 64 ] ) => {
230
242
 
231
243
  if ( workgroupSize.length === 0 || workgroupSize.length > 3 ) {
232
244
 
233
- console.error( 'THREE.TSL: compute() workgroupSize must have 1, 2, or 3 elements' );
245
+ error( 'TSL: compute() workgroupSize must have 1, 2, or 3 elements' );
234
246
 
235
247
  }
236
248
 
@@ -240,7 +252,7 @@ export const computeKernel = ( node, workgroupSize = [ 64 ] ) => {
240
252
 
241
253
  if ( typeof val !== 'number' || val <= 0 || ! Number.isInteger( val ) ) {
242
254
 
243
- console.error( `THREE.TSL: compute() workgroupSize element at index [ ${ i } ] must be a positive integer` );
255
+ error( `TSL: compute() workgroupSize element at index [ ${ i } ] must be a positive integer` );
244
256
 
245
257
  }
246
258
 
@@ -262,7 +274,7 @@ export const computeKernel = ( node, workgroupSize = [ 64 ] ) => {
262
274
  * @tsl
263
275
  * @function
264
276
  * @param {Node} node - TODO
265
- * @param {number} count - TODO.
277
+ * @param {number|Array<number>} count - TODO.
266
278
  * @param {Array<number>} [workgroupSize=[64]] - TODO.
267
279
  * @returns {AtomicFunctionNode}
268
280
  */