super-three 0.168.0 → 0.169.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 (288) hide show
  1. package/build/three.cjs +384 -700
  2. package/build/three.module.js +384 -700
  3. package/build/three.module.min.js +1 -1
  4. package/build/three.webgpu.js +24644 -22406
  5. package/build/three.webgpu.min.js +1 -1
  6. package/build/three.webgpu.nodes.js +79941 -0
  7. package/build/three.webgpu.nodes.min.js +6 -0
  8. package/examples/jsm/Addons.js +0 -6
  9. package/examples/jsm/controls/TrackballControls.js +32 -12
  10. package/examples/jsm/controls/TransformControls.js +97 -62
  11. package/examples/jsm/exporters/DRACOExporter.js +4 -2
  12. package/examples/jsm/exporters/EXRExporter.js +19 -11
  13. package/examples/jsm/exporters/KTX2Exporter.js +21 -13
  14. package/examples/jsm/exporters/OBJExporter.js +5 -1
  15. package/examples/jsm/exporters/PLYExporter.js +9 -7
  16. package/examples/jsm/geometries/DecalGeometry.js +4 -1
  17. package/examples/jsm/geometries/InstancedPointsGeometry.js +1 -1
  18. package/examples/jsm/helpers/LightProbeHelper.js +1 -1
  19. package/examples/jsm/helpers/LightProbeHelperGPU.js +65 -0
  20. package/examples/jsm/libs/basis/basis_transcoder.js +8 -10
  21. package/examples/jsm/libs/basis/basis_transcoder.wasm +0 -0
  22. package/examples/jsm/libs/ktx-parse.module.js +1 -1
  23. package/examples/jsm/lights/LightProbeGenerator.js +24 -10
  24. package/examples/jsm/loaders/ColladaLoader.js +9 -6
  25. package/examples/jsm/loaders/DRACOLoader.js +3 -1
  26. package/examples/jsm/loaders/FBXLoader.js +30 -20
  27. package/examples/jsm/loaders/GLTFLoader.js +5 -10
  28. package/examples/jsm/loaders/KTX2Loader.js +10 -7
  29. package/examples/jsm/loaders/MTLLoader.js +4 -3
  30. package/examples/jsm/loaders/MaterialXLoader.js +29 -10
  31. package/examples/jsm/loaders/OBJLoader.js +5 -3
  32. package/examples/jsm/loaders/PCDLoader.js +5 -4
  33. package/examples/jsm/loaders/PDBLoader.js +3 -2
  34. package/examples/jsm/loaders/PLYLoader.js +8 -5
  35. package/examples/jsm/loaders/STLLoader.js +3 -2
  36. package/examples/jsm/loaders/VRMLLoader.js +10 -10
  37. package/examples/jsm/loaders/VTKLoader.js +4 -3
  38. package/examples/jsm/loaders/XYZLoader.js +3 -2
  39. package/examples/jsm/misc/Timer.js +1 -1
  40. package/examples/jsm/modifiers/CurveModifierGPU.js +233 -0
  41. package/examples/jsm/objects/LensflareMesh.js +322 -0
  42. package/examples/jsm/objects/SkyMesh.js +1 -2
  43. package/examples/jsm/objects/Water2Mesh.js +2 -3
  44. package/examples/jsm/objects/WaterMesh.js +1 -2
  45. package/examples/jsm/physics/JoltPhysics.js +1 -1
  46. package/examples/jsm/physics/RapierPhysics.js +1 -1
  47. package/examples/jsm/transpiler/GLSLDecoder.js +1 -1
  48. package/examples/jsm/transpiler/ShaderToyDecoder.js +2 -2
  49. package/examples/jsm/utils/GeometryCompressionUtils.js +37 -122
  50. package/examples/jsm/utils/ShadowMapViewer.js +3 -8
  51. package/examples/jsm/utils/ShadowMapViewerGPU.js +201 -0
  52. package/examples/jsm/utils/SkeletonUtils.js +84 -66
  53. package/examples/jsm/utils/TextureUtils.js +1 -0
  54. package/examples/jsm/utils/TextureUtilsGPU.js +63 -0
  55. package/examples/jsm/webxr/XRControllerModelFactory.js +1 -1
  56. package/package.json +2 -2
  57. package/src/Three.WebGPU.Nodes.js +200 -0
  58. package/src/Three.WebGPU.js +2 -1
  59. package/src/audio/Audio.js +2 -2
  60. package/src/constants.js +1 -1
  61. package/src/core/BufferAttribute.js +0 -9
  62. package/src/core/Clock.js +1 -1
  63. package/src/core/InterleavedBuffer.js +0 -9
  64. package/src/extras/Controls.js +1 -1
  65. package/src/geometries/CylinderGeometry.js +11 -4
  66. package/src/loaders/MaterialLoader.js +7 -1
  67. package/src/loaders/nodes/NodeLoader.js +24 -4
  68. package/src/loaders/nodes/NodeMaterialLoader.js +21 -17
  69. package/src/loaders/nodes/NodeObjectLoader.js +19 -0
  70. package/src/materials/nodes/InstancedPointsNodeMaterial.js +19 -34
  71. package/src/materials/nodes/Line2NodeMaterial.js +26 -26
  72. package/src/materials/nodes/LineBasicNodeMaterial.js +7 -3
  73. package/src/materials/nodes/LineDashedNodeMaterial.js +7 -3
  74. package/src/materials/nodes/MeshBasicNodeMaterial.js +7 -3
  75. package/src/materials/nodes/MeshLambertNodeMaterial.js +7 -3
  76. package/src/materials/nodes/MeshMatcapNodeMaterial.js +7 -3
  77. package/src/materials/nodes/MeshNormalNodeMaterial.js +7 -3
  78. package/src/materials/nodes/MeshPhongNodeMaterial.js +7 -3
  79. package/src/materials/nodes/MeshPhysicalNodeMaterial.js +6 -3
  80. package/src/materials/nodes/MeshSSSNodeMaterial.js +6 -3
  81. package/src/materials/nodes/MeshStandardNodeMaterial.js +7 -3
  82. package/src/materials/nodes/MeshToonNodeMaterial.js +7 -3
  83. package/src/materials/nodes/NodeMaterial.js +20 -45
  84. package/src/materials/nodes/NodeMaterials.js +2 -0
  85. package/src/materials/nodes/PointsNodeMaterial.js +7 -3
  86. package/src/materials/nodes/ShadowNodeMaterial.js +7 -3
  87. package/src/materials/nodes/SpriteNodeMaterial.js +39 -6
  88. package/src/materials/nodes/VolumeNodeMaterial.js +13 -9
  89. package/src/materials/nodes/manager/NodeMaterialObserver.js +302 -0
  90. package/src/math/Triangle.js +24 -0
  91. package/src/nodes/Nodes.js +3 -3
  92. package/src/nodes/TSL.js +96 -93
  93. package/src/nodes/accessors/BatchNode.js +7 -3
  94. package/src/nodes/accessors/BufferAttributeNode.js +6 -3
  95. package/src/nodes/accessors/BufferNode.js +6 -3
  96. package/src/nodes/accessors/Camera.js +10 -16
  97. package/src/nodes/accessors/ClippingNode.js +7 -3
  98. package/src/nodes/accessors/CubeTextureNode.js +6 -3
  99. package/src/nodes/accessors/InstanceNode.js +11 -11
  100. package/src/nodes/accessors/InstancedPointsMaterialNode.js +6 -3
  101. package/src/nodes/accessors/Lights.js +51 -0
  102. package/src/nodes/accessors/MaterialNode.js +8 -4
  103. package/src/nodes/accessors/MaterialReferenceNode.js +6 -3
  104. package/src/nodes/accessors/ModelNode.js +42 -7
  105. package/src/nodes/accessors/ModelViewProjectionNode.js +9 -5
  106. package/src/nodes/accessors/MorphNode.js +7 -3
  107. package/src/nodes/accessors/Normal.js +32 -6
  108. package/src/nodes/accessors/Object3DNode.js +11 -27
  109. package/src/nodes/accessors/PointUVNode.js +7 -3
  110. package/src/nodes/accessors/ReferenceBaseNode.js +32 -4
  111. package/src/nodes/accessors/ReferenceNode.js +40 -3
  112. package/src/nodes/accessors/RendererReferenceNode.js +9 -3
  113. package/src/nodes/accessors/SceneNode.js +7 -3
  114. package/src/nodes/accessors/SkinningNode.js +7 -3
  115. package/src/nodes/accessors/StorageBufferNode.js +21 -3
  116. package/src/nodes/accessors/StorageTextureNode.js +7 -4
  117. package/src/nodes/accessors/Texture3DNode.js +7 -4
  118. package/src/nodes/accessors/TextureNode.js +19 -8
  119. package/src/nodes/accessors/TextureSizeNode.js +8 -5
  120. package/src/nodes/accessors/UniformArrayNode.js +12 -9
  121. package/src/nodes/accessors/UserDataNode.js +9 -6
  122. package/src/nodes/accessors/VelocityNode.js +74 -23
  123. package/src/nodes/accessors/VertexColorNode.js +6 -3
  124. package/src/nodes/code/CodeNode.js +7 -3
  125. package/src/nodes/code/ExpressionNode.js +8 -4
  126. package/src/nodes/code/FunctionCallNode.js +6 -3
  127. package/src/nodes/code/FunctionNode.js +6 -3
  128. package/src/nodes/code/ScriptableNode.js +11 -6
  129. package/src/nodes/code/ScriptableValueNode.js +7 -3
  130. package/src/nodes/core/AssignNode.js +9 -6
  131. package/src/nodes/core/AttributeNode.js +7 -3
  132. package/src/nodes/core/BypassNode.js +8 -4
  133. package/src/nodes/core/CacheNode.js +8 -4
  134. package/src/nodes/core/ConstNode.js +6 -3
  135. package/src/nodes/core/ContextNode.js +7 -3
  136. package/src/nodes/core/IndexNode.js +25 -3
  137. package/src/nodes/core/InputNode.js +7 -3
  138. package/src/nodes/core/MRTNode.js +6 -3
  139. package/src/nodes/core/Node.js +10 -51
  140. package/src/nodes/core/NodeBuilder.js +71 -5
  141. package/src/nodes/core/NodeUtils.js +48 -6
  142. package/src/nodes/core/OutputStructNode.js +8 -4
  143. package/src/nodes/core/ParameterNode.js +6 -3
  144. package/src/nodes/core/PropertyNode.js +7 -3
  145. package/src/nodes/core/StackNode.js +7 -3
  146. package/src/nodes/core/StructTypeNode.js +7 -3
  147. package/src/nodes/core/TempNode.js +8 -4
  148. package/src/nodes/core/UniformGroupNode.js +10 -6
  149. package/src/nodes/core/UniformNode.js +6 -3
  150. package/src/nodes/core/VarNode.js +8 -4
  151. package/src/nodes/core/VaryingNode.js +7 -3
  152. package/src/nodes/display/AfterImageNode.js +6 -0
  153. package/src/nodes/display/AnaglyphPassNode.js +6 -0
  154. package/src/nodes/display/AnamorphicNode.js +6 -0
  155. package/src/nodes/display/BloomNode.js +6 -0
  156. package/src/nodes/display/BumpMapNode.js +6 -0
  157. package/src/nodes/display/ColorSpaceFunctions.js +4 -4
  158. package/src/nodes/display/ColorSpaceNode.js +43 -14
  159. package/src/nodes/display/DenoiseNode.js +6 -3
  160. package/src/nodes/display/DepthOfFieldNode.js +6 -3
  161. package/src/nodes/display/DotScreenNode.js +8 -5
  162. package/src/nodes/display/FXAANode.js +6 -3
  163. package/src/nodes/display/FilmNode.js +6 -3
  164. package/src/nodes/display/FrontFacingNode.js +7 -3
  165. package/src/nodes/display/GTAONode.js +6 -3
  166. package/src/nodes/display/GaussianBlurNode.js +6 -3
  167. package/src/nodes/display/Lut3DNode.js +6 -3
  168. package/src/nodes/display/NormalMapNode.js +8 -6
  169. package/src/nodes/display/ParallaxBarrierPassNode.js +8 -5
  170. package/src/nodes/display/PassNode.js +18 -7
  171. package/src/nodes/display/PixelationPassNode.js +12 -5
  172. package/src/nodes/display/PosterizeNode.js +6 -3
  173. package/src/nodes/display/RGBShiftNode.js +6 -3
  174. package/src/nodes/display/RenderOutputNode.js +12 -8
  175. package/src/nodes/display/SSAAPassNode.js +6 -3
  176. package/src/nodes/display/ScreenNode.js +181 -0
  177. package/src/nodes/display/SobelOperatorNode.js +6 -3
  178. package/src/nodes/display/StereoCompositePassNode.js +6 -3
  179. package/src/nodes/display/StereoPassNode.js +6 -3
  180. package/src/nodes/display/ToneMappingFunctions.js +12 -12
  181. package/src/nodes/display/ToneMappingNode.js +8 -7
  182. package/src/nodes/display/ToonOutlinePassNode.js +111 -0
  183. package/src/nodes/display/TransitionNode.js +6 -3
  184. package/src/nodes/display/ViewportDepthNode.js +7 -3
  185. package/src/nodes/display/ViewportDepthTextureNode.js +8 -5
  186. package/src/nodes/display/ViewportSharedTextureNode.js +8 -5
  187. package/src/nodes/display/ViewportTextureNode.js +8 -5
  188. package/src/nodes/fog/FogExp2Node.js +6 -3
  189. package/src/nodes/fog/FogNode.js +7 -3
  190. package/src/nodes/fog/FogRangeNode.js +6 -3
  191. package/src/nodes/functions/PhysicalLightingModel.js +2 -2
  192. package/src/nodes/functions/material/getShIrradianceAt.js +28 -0
  193. package/src/nodes/geometry/RangeNode.js +7 -3
  194. package/src/nodes/gpgpu/AtomicFunctionNode.js +99 -0
  195. package/src/nodes/gpgpu/BarrierNode.js +40 -0
  196. package/src/nodes/gpgpu/ComputeBuiltinNode.js +98 -0
  197. package/src/nodes/gpgpu/ComputeNode.js +8 -4
  198. package/src/nodes/gpgpu/WorkgroupInfoNode.js +100 -0
  199. package/src/nodes/lighting/AONode.js +6 -3
  200. package/src/nodes/lighting/AmbientLightNode.js +6 -3
  201. package/src/nodes/lighting/AnalyticLightNode.js +198 -30
  202. package/src/nodes/lighting/BasicEnvironmentNode.js +6 -3
  203. package/src/nodes/lighting/BasicLightMapNode.js +6 -3
  204. package/src/nodes/lighting/DirectionalLightNode.js +7 -4
  205. package/src/nodes/lighting/EnvironmentNode.js +6 -3
  206. package/src/nodes/lighting/HemisphereLightNode.js +10 -6
  207. package/src/nodes/lighting/IESSpotLightNode.js +6 -3
  208. package/src/nodes/lighting/IrradianceNode.js +6 -3
  209. package/src/nodes/lighting/LightProbeNode.js +8 -31
  210. package/src/nodes/lighting/LightingContextNode.js +6 -3
  211. package/src/nodes/lighting/LightingNode.js +7 -3
  212. package/src/nodes/lighting/LightsNode.js +24 -5
  213. package/src/nodes/lighting/PointLightNode.js +11 -7
  214. package/src/nodes/lighting/RectAreaLightNode.js +11 -7
  215. package/src/nodes/lighting/SpotLightNode.js +13 -10
  216. package/src/nodes/math/ConditionalNode.js +23 -6
  217. package/src/nodes/math/MathNode.js +6 -3
  218. package/src/nodes/math/OperatorNode.js +6 -3
  219. package/src/nodes/pmrem/PMREMNode.js +6 -3
  220. package/src/nodes/utils/ArrayElementNode.js +8 -4
  221. package/src/nodes/utils/ConvertNode.js +7 -3
  222. package/src/nodes/utils/CubeMapNode.js +6 -3
  223. package/src/nodes/utils/EquirectUVNode.js +6 -3
  224. package/src/nodes/utils/FlipNode.js +7 -4
  225. package/src/nodes/utils/FunctionOverloadingNode.js +7 -3
  226. package/src/nodes/utils/JoinNode.js +6 -3
  227. package/src/nodes/utils/LoopNode.js +7 -3
  228. package/src/nodes/utils/MatcapUVNode.js +6 -3
  229. package/src/nodes/utils/MaxMipLevelNode.js +6 -3
  230. package/src/nodes/utils/OscNode.js +7 -3
  231. package/src/nodes/utils/RTTNode.js +6 -3
  232. package/src/nodes/utils/ReflectorNode.js +8 -5
  233. package/src/nodes/utils/RemapNode.js +7 -3
  234. package/src/nodes/utils/RotateNode.js +6 -3
  235. package/src/nodes/utils/SetNode.js +7 -4
  236. package/src/nodes/utils/SplitNode.js +7 -3
  237. package/src/nodes/utils/SpriteSheetUVNode.js +7 -3
  238. package/src/nodes/utils/StorageArrayElementNode.js +9 -8
  239. package/src/nodes/utils/TimerNode.js +6 -3
  240. package/src/nodes/utils/TriplanarTexturesNode.js +7 -3
  241. package/src/nodes/utils/ViewportUtils.js +2 -2
  242. package/src/objects/BatchedMesh.js +76 -10
  243. package/src/objects/LOD.js +21 -0
  244. package/src/objects/Line.js +1 -0
  245. package/src/objects/Mesh.js +7 -23
  246. package/src/objects/Points.js +2 -0
  247. package/src/renderers/WebGLRenderer.js +65 -50
  248. package/src/renderers/common/BundleGroup.js +26 -0
  249. package/src/renderers/common/ClippingContext.js +4 -3
  250. package/src/renderers/common/RenderContext.js +4 -5
  251. package/src/renderers/common/RenderObject.js +116 -5
  252. package/src/renderers/common/RenderObjects.js +8 -1
  253. package/src/renderers/common/Renderer.js +57 -49
  254. package/src/renderers/common/extras/PMREMGenerator.js +7 -9
  255. package/src/renderers/common/nodes/NodeBuilderState.js +3 -3
  256. package/src/renderers/common/nodes/Nodes.js +33 -14
  257. package/src/renderers/shaders/ShaderLib/sprite.glsl.js +2 -4
  258. package/src/renderers/webgl/WebGLAttributes.js +45 -14
  259. package/src/renderers/webgl/WebGLCapabilities.js +9 -0
  260. package/src/renderers/webgl/WebGLProgram.js +2 -0
  261. package/src/renderers/webgl/WebGLPrograms.js +21 -17
  262. package/src/renderers/webgl/WebGLState.js +21 -0
  263. package/src/renderers/webgl/WebGLTextures.js +22 -0
  264. package/src/renderers/webgl-fallback/WebGLBackend.js +50 -45
  265. package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +4 -4
  266. package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +6 -0
  267. package/src/renderers/webgl-fallback/utils/WebGLState.js +1 -4
  268. package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +61 -16
  269. package/src/renderers/webgpu/WebGPUBackend.js +33 -25
  270. package/src/renderers/webgpu/WebGPURenderer.Nodes.js +42 -0
  271. package/src/renderers/webgpu/WebGPURenderer.js +5 -2
  272. package/src/renderers/webgpu/nodes/BasicNodeLibrary.js +59 -0
  273. package/src/renderers/{common → webgpu}/nodes/StandardNodeLibrary.js +11 -11
  274. package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +91 -11
  275. package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +6 -16
  276. package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +1 -1
  277. package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +7 -5
  278. package/src/renderers/webgpu/utils/WebGPUUtils.js +1 -1
  279. package/src/utils.js +33 -1
  280. package/examples/jsm/geometries/SDFGeometryGenerator.js +0 -144
  281. package/examples/jsm/loaders/TiltLoader.js +0 -520
  282. package/examples/jsm/utils/GPUStatsPanel.js +0 -95
  283. package/examples/jsm/utils/PackedPhongMaterial.js +0 -178
  284. package/src/nodes/display/ViewportNode.js +0 -138
  285. package/src/nodes/lighting/LightNode.js +0 -57
  286. package/src/renderers/common/StandardRenderer.js +0 -18
  287. package/src/renderers/webvr/WebVRManager.js +0 -495
  288. package/src/renderers/webvr/WebVRUtils.js +0 -66
@@ -1,10 +1,13 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { addMethodChaining, nodeObject, vec4 } from '../tsl/TSLCore.js';
4
3
 
5
4
  import { LinearSRGBColorSpace, SRGBColorSpace } from '../../constants.js';
5
+ import { ColorManagement } from '../../math/ColorManagement.js';
6
6
 
7
- const getColorSpaceName = ( colorSpace ) => {
7
+ const WORKING_COLOR_SPACE = 'WorkingColorSpace';
8
+ const OUTPUT_COLOR_SPACE = 'OutputColorSpace';
9
+
10
+ function getColorSpaceName( colorSpace ) {
8
11
 
9
12
  let method = null;
10
13
 
@@ -20,33 +23,55 @@ const getColorSpaceName = ( colorSpace ) => {
20
23
 
21
24
  return method;
22
25
 
23
- };
26
+ }
24
27
 
25
- export const getColorSpaceMethod = ( source, target ) => {
28
+ export function getColorSpaceMethod( source, target ) {
26
29
 
27
30
  return getColorSpaceName( source ) + 'To' + getColorSpaceName( target );
28
31
 
29
- };
32
+ }
30
33
 
31
34
  class ColorSpaceNode extends TempNode {
32
35
 
33
- constructor( colorNode, target = null, source = null ) {
36
+ static get type() {
37
+
38
+ return 'ColorSpaceNode';
39
+
40
+ }
41
+
42
+ constructor( colorNode, source, target ) {
34
43
 
35
44
  super( 'vec4' );
36
45
 
37
46
  this.colorNode = colorNode;
38
- this.target = target;
39
47
  this.source = source;
48
+ this.target = target;
49
+
50
+ }
51
+
52
+ getColorSpace( builder, colorSpace ) {
53
+
54
+ if ( colorSpace === WORKING_COLOR_SPACE ) {
55
+
56
+ return ColorManagement.workingColorSpace;
57
+
58
+ } else if ( colorSpace === OUTPUT_COLOR_SPACE ) {
59
+
60
+ return builder.context.outputColorSpace || builder.renderer.outputColorSpace;
61
+
62
+ }
63
+
64
+ return colorSpace;
40
65
 
41
66
  }
42
67
 
43
68
  setup( builder ) {
44
69
 
45
- const { renderer, context } = builder;
70
+ const { renderer } = builder;
71
+ const { colorNode } = this;
46
72
 
47
- const source = this.source || context.outputColorSpace || renderer.outputColorSpace;
48
- const target = this.target || context.outputColorSpace || renderer.outputColorSpace;
49
- const colorNode = this.colorNode;
73
+ const source = this.getColorSpace( builder, this.source );
74
+ const target = this.getColorSpace( builder, this.target );
50
75
 
51
76
  if ( source === target ) return colorNode;
52
77
 
@@ -76,10 +101,14 @@ class ColorSpaceNode extends TempNode {
76
101
 
77
102
  export default ColorSpaceNode;
78
103
 
79
- ColorSpaceNode.type = /*@__PURE__*/ registerNode( 'ColorSpace', ColorSpaceNode );
104
+ export const toOutputColorSpace = ( node ) => nodeObject( new ColorSpaceNode( nodeObject( node ), WORKING_COLOR_SPACE, OUTPUT_COLOR_SPACE ) );
105
+ export const toWorkingColorSpace = ( node ) => nodeObject( new ColorSpaceNode( nodeObject( node ), OUTPUT_COLOR_SPACE, WORKING_COLOR_SPACE ) );
80
106
 
81
- export const toOutputColorSpace = ( node, colorSpace = null ) => nodeObject( new ColorSpaceNode( nodeObject( node ), colorSpace, LinearSRGBColorSpace ) );
82
- export const toWorkingColorSpace = ( node, colorSpace = null ) => nodeObject( new ColorSpaceNode( nodeObject( node ), LinearSRGBColorSpace, colorSpace ) );
107
+ export const workingToColorSpace = ( node, colorSpace ) => nodeObject( new ColorSpaceNode( nodeObject( node ), WORKING_COLOR_SPACE, colorSpace ) );
108
+ export const colorSpaceToWorking = ( node, colorSpace ) => nodeObject( new ColorSpaceNode( nodeObject( node ), colorSpace, WORKING_COLOR_SPACE ) );
83
109
 
84
110
  addMethodChaining( 'toOutputColorSpace', toOutputColorSpace );
85
111
  addMethodChaining( 'toWorkingColorSpace', toWorkingColorSpace );
112
+
113
+ addMethodChaining( 'workingToColorSpace', workingToColorSpace );
114
+ addMethodChaining( 'colorSpaceToWorking', colorSpaceToWorking );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { uv } from '../accessors/UV.js';
4
3
  import { Fn, nodeObject, float, int, vec2, vec3, vec4, mat2, If } from '../tsl/TSLBase.js';
@@ -16,6 +15,12 @@ import { Vector3 } from '../../math/Vector3.js';
16
15
 
17
16
  class DenoiseNode extends TempNode {
18
17
 
18
+ static get type() {
19
+
20
+ return 'DenoiseNode';
21
+
22
+ }
23
+
19
24
  constructor( textureNode, depthNode, normalNode, noiseNode, camera ) {
20
25
 
21
26
  super();
@@ -163,8 +168,6 @@ class DenoiseNode extends TempNode {
163
168
 
164
169
  export default DenoiseNode;
165
170
 
166
- DenoiseNode.type = /*@__PURE__*/ registerNode( 'Denoise', DenoiseNode );
167
-
168
171
  function generatePdSamplePointInitializer( samples, rings, radiusExponent ) {
169
172
 
170
173
  const poissonDisk = generateDenoiseSamples( samples, rings, radiusExponent );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { uv } from '../accessors/UV.js';
4
3
  import { Fn, nodeObject, vec2, vec4 } from '../tsl/TSLBase.js';
@@ -9,6 +8,12 @@ import { convertToTexture } from '../utils/RTTNode.js';
9
8
 
10
9
  class DepthOfFieldNode extends TempNode {
11
10
 
11
+ static get type() {
12
+
13
+ return 'DepthOfFieldNode';
14
+
15
+ }
16
+
12
17
  constructor( textureNode, viewZNode, focusNode, apertureNode, maxblurNode ) {
13
18
 
14
19
  super();
@@ -116,6 +121,4 @@ class DepthOfFieldNode extends TempNode {
116
121
 
117
122
  export default DepthOfFieldNode;
118
123
 
119
- DepthOfFieldNode.type = /*@__PURE__*/ registerNode( 'DepthOfField', DepthOfFieldNode );
120
-
121
124
  export const dof = ( node, viewZNode, focus = 1, aperture = 0.025, maxblur = 1 ) => nodeObject( new DepthOfFieldNode( convertToTexture( node ), nodeObject( viewZNode ), nodeObject( focus ), nodeObject( aperture ), nodeObject( maxblur ) ) );
@@ -1,16 +1,21 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { nodeObject, Fn, vec2, vec3, vec4 } from '../tsl/TSLBase.js';
4
3
  import { uniform } from '../core/UniformNode.js';
5
4
  import { uv } from '../accessors/UV.js';
6
5
  import { sin, cos } from '../math/MathNode.js';
7
6
  import { add } from '../math/OperatorNode.js';
8
- import { viewportResolution } from '../display/ViewportNode.js';
7
+ import { screenSize } from './ScreenNode.js';
9
8
 
10
9
  import { Vector2 } from '../../math/Vector2.js';
11
10
 
12
11
  class DotScreenNode extends TempNode {
13
12
 
13
+ static get type() {
14
+
15
+ return 'DotScreenNode';
16
+
17
+ }
18
+
14
19
  constructor( inputNode, center = new Vector2( 0.5, 0.5 ), angle = 1.57, scale = 1 ) {
15
20
 
16
21
  super( 'vec4' );
@@ -31,7 +36,7 @@ class DotScreenNode extends TempNode {
31
36
  const s = sin( this.angle );
32
37
  const c = cos( this.angle );
33
38
 
34
- const tex = uv().mul( viewportResolution ).sub( this.center );
39
+ const tex = uv().mul( screenSize ).sub( this.center );
35
40
  const point = vec2( c.mul( tex.x ).sub( s.mul( tex.y ) ), s.mul( tex.x ).add( c.mul( tex.y ) ) ).mul( this.scale );
36
41
 
37
42
  return sin( point.x ).mul( sin( point.y ) ).mul( 4 );
@@ -58,6 +63,4 @@ class DotScreenNode extends TempNode {
58
63
 
59
64
  export default DotScreenNode;
60
65
 
61
- DotScreenNode.type = /*@__PURE__*/ registerNode( 'DotScreen', DotScreenNode );
62
-
63
66
  export const dotScreen = ( node, center, angle, scale ) => nodeObject( new DotScreenNode( nodeObject( node ), center, angle, scale ) );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { uv } from '../accessors/UV.js';
4
3
  import { Fn, nodeObject, float, vec2, vec4, int, If } from '../tsl/TSLBase.js';
@@ -13,6 +12,12 @@ import { Vector2 } from '../../math/Vector2.js';
13
12
 
14
13
  class FXAANode extends TempNode {
15
14
 
15
+ static get type() {
16
+
17
+ return 'FXAANode';
18
+
19
+ }
20
+
16
21
  constructor( textureNode ) {
17
22
 
18
23
  super();
@@ -324,6 +329,4 @@ class FXAANode extends TempNode {
324
329
 
325
330
  export default FXAANode;
326
331
 
327
- FXAANode.type = /*@__PURE__*/ registerNode( 'FXAA', FXAANode );
328
-
329
332
  export const fxaa = ( node ) => nodeObject( new FXAANode( convertToTexture( node ) ) );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { uv } from '../accessors/UV.js';
4
3
  import { Fn, nodeProxy, vec4 } from '../tsl/TSLBase.js';
@@ -7,6 +6,12 @@ import { timerLocal } from '../utils/TimerNode.js';
7
6
 
8
7
  class FilmNode extends TempNode {
9
8
 
9
+ static get type() {
10
+
11
+ return 'FilmNode';
12
+
13
+ }
14
+
10
15
  constructor( inputNode, intensityNode = null, uvNode = null ) {
11
16
 
12
17
  super();
@@ -48,6 +53,4 @@ class FilmNode extends TempNode {
48
53
 
49
54
  export default FilmNode;
50
55
 
51
- FilmNode.type = /*@__PURE__*/ registerNode( 'Film', FilmNode );
52
-
53
56
  export const film = /*@__PURE__*/ nodeProxy( FilmNode );
@@ -1,10 +1,16 @@
1
- import Node, { registerNode } from '../core/Node.js';
1
+ import Node from '../core/Node.js';
2
2
  import { nodeImmutable, float } from '../tsl/TSLBase.js';
3
3
 
4
4
  import { BackSide, WebGLCoordinateSystem } from '../../constants.js';
5
5
 
6
6
  class FrontFacingNode extends Node {
7
7
 
8
+ static get type() {
9
+
10
+ return 'FrontFacingNode';
11
+
12
+ }
13
+
8
14
  constructor() {
9
15
 
10
16
  super( 'bool' );
@@ -35,7 +41,5 @@ class FrontFacingNode extends Node {
35
41
 
36
42
  export default FrontFacingNode;
37
43
 
38
- FrontFacingNode.type = /*@__PURE__*/ registerNode( 'FrontFacing', FrontFacingNode );
39
-
40
44
  export const frontFacing = /*@__PURE__*/ nodeImmutable( FrontFacingNode );
41
45
  export const faceDirection = /*@__PURE__*/ float( frontFacing ).mul( 2.0 ).sub( 1.0 );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { texture } from '../accessors/TextureNode.js';
4
3
  import { textureSize } from '../accessors/TextureSizeNode.js';
@@ -26,6 +25,12 @@ const _size = /*@__PURE__*/ new Vector2();
26
25
 
27
26
  class GTAONode extends TempNode {
28
27
 
28
+ static get type() {
29
+
30
+ return 'GTAONode';
31
+
32
+ }
33
+
29
34
  constructor( depthNode, normalNode, camera ) {
30
35
 
31
36
  super();
@@ -239,8 +244,6 @@ class GTAONode extends TempNode {
239
244
 
240
245
  export default GTAONode;
241
246
 
242
- GTAONode.type = /*@__PURE__*/ registerNode( 'GTAO', GTAONode );
243
-
244
247
  function generateMagicSquareNoise( size = 5 ) {
245
248
 
246
249
  const noiseSize = Math.floor( size ) % 2 === 0 ? Math.floor( size ) + 1 : Math.floor( size );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { nodeObject, Fn, float, vec2, vec4 } from '../tsl/TSLBase.js';
4
3
  import { NodeUpdateType } from '../core/constants.js';
@@ -21,6 +20,12 @@ const _quadMesh2 = /*@__PURE__*/ new QuadMesh();
21
20
 
22
21
  class GaussianBlurNode extends TempNode {
23
22
 
23
+ static get type() {
24
+
25
+ return 'GaussianBlurNode';
26
+
27
+ }
28
+
24
29
  constructor( textureNode, directionNode = null, sigma = 2 ) {
25
30
 
26
31
  super( 'vec4' );
@@ -205,6 +210,4 @@ class GaussianBlurNode extends TempNode {
205
210
 
206
211
  export default GaussianBlurNode;
207
212
 
208
- GaussianBlurNode.type = /*@__PURE__*/ registerNode( 'GaussianBlur', GaussianBlurNode );
209
-
210
213
  export const gaussianBlur = ( node, directionNode, sigma ) => nodeObject( new GaussianBlurNode( convertToTexture( node ), directionNode, sigma ) );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { Fn, nodeObject, vec3, vec4, float } from '../tsl/TSLBase.js';
4
3
  import { uniform } from '../core/UniformNode.js';
@@ -6,6 +5,12 @@ import { mix } from '../math/MathNode.js';
6
5
 
7
6
  class Lut3DNode extends TempNode {
8
7
 
8
+ static get type() {
9
+
10
+ return 'Lut3DNode';
11
+
12
+ }
13
+
9
14
  constructor( inputNode, lutNode, size, intensityNode ) {
10
15
 
11
16
  super();
@@ -49,6 +54,4 @@ class Lut3DNode extends TempNode {
49
54
 
50
55
  export default Lut3DNode;
51
56
 
52
- Lut3DNode.type = /*@__PURE__*/ registerNode( 'Lut3D', Lut3DNode );
53
-
54
57
  export const lut3D = ( node, lut, size, intensity ) => nodeObject( new Lut3DNode( nodeObject( node ), nodeObject( lut ), size, nodeObject( intensity ) ) );
@@ -1,9 +1,7 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { add } from '../math/OperatorNode.js';
4
3
 
5
- import { modelNormalMatrix } from '../accessors/ModelNode.js';
6
- import { normalView } from '../accessors/Normal.js';
4
+ import { normalView, transformNormalToView } from '../accessors/Normal.js';
7
5
  import { positionView } from '../accessors/Position.js';
8
6
  import { TBNViewMatrix } from '../accessors/AccessorsUtils.js';
9
7
  import { uv } from '../accessors/UV.js';
@@ -41,6 +39,12 @@ const perturbNormal2Arb = /*@__PURE__*/ Fn( ( inputs ) => {
41
39
 
42
40
  class NormalMapNode extends TempNode {
43
41
 
42
+ static get type() {
43
+
44
+ return 'NormalMapNode';
45
+
46
+ }
47
+
44
48
  constructor( node, scaleNode = null ) {
45
49
 
46
50
  super( 'vec3' );
@@ -68,7 +72,7 @@ class NormalMapNode extends TempNode {
68
72
 
69
73
  if ( normalMapType === ObjectSpaceNormalMap ) {
70
74
 
71
- outputNode = modelNormalMatrix.mul( normalMap ).normalize();
75
+ outputNode = transformNormalToView( normalMap );
72
76
 
73
77
  } else if ( normalMapType === TangentSpaceNormalMap ) {
74
78
 
@@ -99,6 +103,4 @@ class NormalMapNode extends TempNode {
99
103
 
100
104
  export default NormalMapNode;
101
105
 
102
- NormalMapNode.type = /*@__PURE__*/ registerNode( 'NormalMap', NormalMapNode );
103
-
104
106
  export const normalMap = /*@__PURE__*/ nodeProxy( NormalMapNode );
@@ -1,13 +1,18 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import { Fn, If, nodeObject, vec4 } from '../tsl/TSLBase.js';
3
2
  import { uv } from '../accessors/UV.js';
4
3
  import { mod } from '../math/MathNode.js';
5
- import { viewportCoordinate } from './ViewportNode.js';
4
+ import { screenCoordinate } from './ScreenNode.js';
6
5
  import StereoCompositePassNode from './StereoCompositePassNode.js';
7
6
  import NodeMaterial from '../../materials/nodes/NodeMaterial.js';
8
7
 
9
8
  class ParallaxBarrierPassNode extends StereoCompositePassNode {
10
9
 
10
+ static get type() {
11
+
12
+ return 'ParallaxBarrierPassNode';
13
+
14
+ }
15
+
11
16
  constructor( scene, camera ) {
12
17
 
13
18
  super( scene, camera );
@@ -24,7 +29,7 @@ class ParallaxBarrierPassNode extends StereoCompositePassNode {
24
29
 
25
30
  const color = vec4().toVar();
26
31
 
27
- If( mod( viewportCoordinate.y, 2 ).greaterThan( 1 ), () => {
32
+ If( mod( screenCoordinate.y, 2 ).greaterThan( 1 ), () => {
28
33
 
29
34
  color.assign( this._mapLeft.uv( uvNode ) );
30
35
 
@@ -50,6 +55,4 @@ class ParallaxBarrierPassNode extends StereoCompositePassNode {
50
55
 
51
56
  export default ParallaxBarrierPassNode;
52
57
 
53
- ParallaxBarrierPassNode.type = /*@__PURE__*/ registerNode( 'ParallaxBarrierPass', ParallaxBarrierPassNode );
54
-
55
58
  export const parallaxBarrierPass = ( scene, camera ) => nodeObject( new ParallaxBarrierPassNode( scene, camera ) );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { default as TextureNode/*, texture*/ } from '../accessors/TextureNode.js';
4
3
  import { NodeUpdateType } from '../core/constants.js';
@@ -15,6 +14,12 @@ const _size = /*@__PURE__*/ new Vector2();
15
14
 
16
15
  class PassTextureNode extends TextureNode {
17
16
 
17
+ static get type() {
18
+
19
+ return 'PassTextureNode';
20
+
21
+ }
22
+
18
23
  constructor( passNode, texture ) {
19
24
 
20
25
  super( texture );
@@ -41,10 +46,14 @@ class PassTextureNode extends TextureNode {
41
46
 
42
47
  }
43
48
 
44
- PassTextureNode.type = /*@__PURE__*/ registerNode( 'PassTexture', PassTextureNode );
45
-
46
49
  class PassMultipleTextureNode extends PassTextureNode {
47
50
 
51
+ static get type() {
52
+
53
+ return 'PassMultipleTextureNode';
54
+
55
+ }
56
+
48
57
  constructor( passNode, textureName, previousTexture = false ) {
49
58
 
50
59
  super( passNode, null );
@@ -76,10 +85,14 @@ class PassMultipleTextureNode extends PassTextureNode {
76
85
 
77
86
  }
78
87
 
79
- PassMultipleTextureNode.type = /*@__PURE__*/ registerNode( 'PassMultipleTexture', PassMultipleTextureNode );
80
-
81
88
  class PassNode extends TempNode {
82
89
 
90
+ static get type() {
91
+
92
+ return 'PassNode';
93
+
94
+ }
95
+
83
96
  constructor( scope, scene, camera, options = {} ) {
84
97
 
85
98
  super( 'vec4' );
@@ -360,8 +373,6 @@ PassNode.DEPTH = 'depth';
360
373
 
361
374
  export default PassNode;
362
375
 
363
- PassNode.type = /*@__PURE__*/ registerNode( 'Pass', PassNode );
364
-
365
376
  export const pass = ( scene, camera, options ) => nodeObject( new PassNode( PassNode.COLOR, scene, camera, options ) );
366
377
  export const passTexture = ( pass, texture ) => nodeObject( new PassTextureNode( pass, texture ) );
367
378
  export const depthPass = ( scene, camera ) => nodeObject( new PassNode( PassNode.DEPTH, scene, camera ) );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { uv } from '../accessors/UV.js';
4
3
  import { Fn, nodeObject, vec2, vec3, float, If } from '../tsl/TSLBase.js';
@@ -16,6 +15,12 @@ import { NearestFilter } from '../../constants.js';
16
15
 
17
16
  class PixelationNode extends TempNode {
18
17
 
18
+ static get type() {
19
+
20
+ return 'PixelationNode';
21
+
22
+ }
23
+
19
24
  constructor( textureNode, depthNode, normalNode, pixelSize, normalEdgeStrength, depthEdgeStrength ) {
20
25
 
21
26
  super();
@@ -153,12 +158,16 @@ class PixelationNode extends TempNode {
153
158
 
154
159
  }
155
160
 
156
- PixelationNode.type = /*@__PURE__*/ registerNode( 'Pixelation', PixelationNode );
157
-
158
161
  const pixelation = ( node, depthNode, normalNode, pixelSize = 6, normalEdgeStrength = 0.3, depthEdgeStrength = 0.4 ) => nodeObject( new PixelationNode( convertToTexture( node ), convertToTexture( depthNode ), convertToTexture( normalNode ), nodeObject( pixelSize ), nodeObject( normalEdgeStrength ), nodeObject( depthEdgeStrength ) ) );
159
162
 
160
163
  class PixelationPassNode extends PassNode {
161
164
 
165
+ static get type() {
166
+
167
+ return 'PixelationPassNode';
168
+
169
+ }
170
+
162
171
  constructor( scene, camera, pixelSize = 6, normalEdgeStrength = 0.3, depthEdgeStrength = 0.4 ) {
163
172
 
164
173
  super( 'color', scene, camera, { minFilter: NearestFilter, magFilter: NearestFilter } );
@@ -202,5 +211,3 @@ class PixelationPassNode extends PassNode {
202
211
  export const pixelationPass = ( scene, camera, pixelSize, normalEdgeStrength, depthEdgeStrength ) => nodeObject( new PixelationPassNode( scene, camera, pixelSize, normalEdgeStrength, depthEdgeStrength ) );
203
212
 
204
213
  export default PixelationPassNode;
205
-
206
- PixelationPassNode.type = /*@__PURE__*/ registerNode( 'PixelationPass', PixelationPassNode );
@@ -1,9 +1,14 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { nodeProxy } from '../tsl/TSLBase.js';
4
3
 
5
4
  class PosterizeNode extends TempNode {
6
5
 
6
+ static get type() {
7
+
8
+ return 'PosterizeNode';
9
+
10
+ }
11
+
7
12
  constructor( sourceNode, stepsNode ) {
8
13
 
9
14
  super();
@@ -25,6 +30,4 @@ class PosterizeNode extends TempNode {
25
30
 
26
31
  export default PosterizeNode;
27
32
 
28
- PosterizeNode.type = /*@__PURE__*/ registerNode( 'Posterize', PosterizeNode );
29
-
30
33
  export const posterize = /*@__PURE__*/ nodeProxy( PosterizeNode );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { nodeObject, Fn, vec2, vec4 } from '../tsl/TSLBase.js';
4
3
  import { uniform } from '../core/UniformNode.js';
@@ -8,6 +7,12 @@ import { convertToTexture } from '../utils/RTTNode.js';
8
7
 
9
8
  class RGBShiftNode extends TempNode {
10
9
 
10
+ static get type() {
11
+
12
+ return 'RGBShiftNode';
13
+
14
+ }
15
+
11
16
  constructor( textureNode, amount = 0.005, angle = 0 ) {
12
17
 
13
18
  super( 'vec4' );
@@ -45,6 +50,4 @@ class RGBShiftNode extends TempNode {
45
50
 
46
51
  export default RGBShiftNode;
47
52
 
48
- RGBShiftNode.type = /*@__PURE__*/ registerNode( 'RGBShift', RGBShiftNode );
49
-
50
53
  export const rgbShift = ( node, amount, angle ) => nodeObject( new RGBShiftNode( convertToTexture( node ), amount, angle ) );
@@ -1,11 +1,17 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import TempNode from '../core/TempNode.js';
3
2
  import { addMethodChaining, nodeObject } from '../tsl/TSLCore.js';
4
3
 
5
- import { LinearSRGBColorSpace, SRGBColorSpace, NoToneMapping } from '../../constants.js';
4
+ import { NoColorSpace, NoToneMapping } from '../../constants.js';
5
+ import { ColorManagement } from '../../math/ColorManagement.js';
6
6
 
7
7
  class RenderOutputNode extends TempNode {
8
8
 
9
+ static get type() {
10
+
11
+ return 'RenderOutputNode';
12
+
13
+ }
14
+
9
15
  constructor( colorNode, toneMapping, outputColorSpace ) {
10
16
 
11
17
  super( 'vec4' );
@@ -25,7 +31,7 @@ class RenderOutputNode extends TempNode {
25
31
  // tone mapping
26
32
 
27
33
  const toneMapping = ( this.toneMapping !== null ? this.toneMapping : context.toneMapping ) || NoToneMapping;
28
- const outputColorSpace = ( this.outputColorSpace !== null ? this.outputColorSpace : context.outputColorSpace ) || LinearSRGBColorSpace;
34
+ const outputColorSpace = ( this.outputColorSpace !== null ? this.outputColorSpace : context.outputColorSpace ) || NoColorSpace;
29
35
 
30
36
  if ( toneMapping !== NoToneMapping ) {
31
37
 
@@ -33,11 +39,11 @@ class RenderOutputNode extends TempNode {
33
39
 
34
40
  }
35
41
 
36
- // output color space
42
+ // working to output color space
37
43
 
38
- if ( outputColorSpace === SRGBColorSpace ) {
44
+ if ( outputColorSpace !== NoColorSpace && outputColorSpace !== ColorManagement.workingColorSpace ) {
39
45
 
40
- outputNode = outputNode.toOutputColorSpace( outputColorSpace );
46
+ outputNode = outputNode.workingToColorSpace( outputColorSpace );
41
47
 
42
48
  }
43
49
 
@@ -49,8 +55,6 @@ class RenderOutputNode extends TempNode {
49
55
 
50
56
  export default RenderOutputNode;
51
57
 
52
- RenderOutputNode.type = /*@__PURE__*/ registerNode( 'RenderOutput', RenderOutputNode );
53
-
54
58
  export const renderOutput = ( color, toneMapping = null, outputColorSpace = null ) => nodeObject( new RenderOutputNode( nodeObject( color ), toneMapping, outputColorSpace ) );
55
59
 
56
60
  addMethodChaining( 'renderOutput', renderOutput );
@@ -1,4 +1,3 @@
1
- import { registerNode } from '../core/Node.js';
2
1
  import { nodeObject } from '../tsl/TSLBase.js';
3
2
  import PassNode from './PassNode.js';
4
3
  import { Color } from '../../math/Color.js';
@@ -24,6 +23,12 @@ const _size = /*@__PURE__*/ new Vector2();
24
23
 
25
24
  class SSAAPassNode extends PassNode {
26
25
 
26
+ static get type() {
27
+
28
+ return 'SSAAPassNode';
29
+
30
+ }
31
+
27
32
  constructor( scene, camera ) {
28
33
 
29
34
  super( PassNode.COLOR, scene, camera );
@@ -242,8 +247,6 @@ class SSAAPassNode extends PassNode {
242
247
 
243
248
  export default SSAAPassNode;
244
249
 
245
- SSAAPassNode.type = /*@__PURE__*/ registerNode( 'SSAAPass', SSAAPassNode );
246
-
247
250
  // These jitter vectors are specified in integers because it is easier.
248
251
  // I am assuming a [-8,8) integer grid, but it needs to be mapped onto [-0.5,0.5)
249
252
  // before being used, thus these integers need to be scaled by 1/16.