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.
- package/build/three.cjs +384 -700
- package/build/three.module.js +384 -700
- package/build/three.module.min.js +1 -1
- package/build/three.webgpu.js +24644 -22406
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +79941 -0
- package/build/three.webgpu.nodes.min.js +6 -0
- package/examples/jsm/Addons.js +0 -6
- package/examples/jsm/controls/TrackballControls.js +32 -12
- package/examples/jsm/controls/TransformControls.js +97 -62
- package/examples/jsm/exporters/DRACOExporter.js +4 -2
- package/examples/jsm/exporters/EXRExporter.js +19 -11
- package/examples/jsm/exporters/KTX2Exporter.js +21 -13
- package/examples/jsm/exporters/OBJExporter.js +5 -1
- package/examples/jsm/exporters/PLYExporter.js +9 -7
- package/examples/jsm/geometries/DecalGeometry.js +4 -1
- package/examples/jsm/geometries/InstancedPointsGeometry.js +1 -1
- package/examples/jsm/helpers/LightProbeHelper.js +1 -1
- package/examples/jsm/helpers/LightProbeHelperGPU.js +65 -0
- package/examples/jsm/libs/basis/basis_transcoder.js +8 -10
- package/examples/jsm/libs/basis/basis_transcoder.wasm +0 -0
- package/examples/jsm/libs/ktx-parse.module.js +1 -1
- package/examples/jsm/lights/LightProbeGenerator.js +24 -10
- package/examples/jsm/loaders/ColladaLoader.js +9 -6
- package/examples/jsm/loaders/DRACOLoader.js +3 -1
- package/examples/jsm/loaders/FBXLoader.js +30 -20
- package/examples/jsm/loaders/GLTFLoader.js +5 -10
- package/examples/jsm/loaders/KTX2Loader.js +10 -7
- package/examples/jsm/loaders/MTLLoader.js +4 -3
- package/examples/jsm/loaders/MaterialXLoader.js +29 -10
- package/examples/jsm/loaders/OBJLoader.js +5 -3
- package/examples/jsm/loaders/PCDLoader.js +5 -4
- package/examples/jsm/loaders/PDBLoader.js +3 -2
- package/examples/jsm/loaders/PLYLoader.js +8 -5
- package/examples/jsm/loaders/STLLoader.js +3 -2
- package/examples/jsm/loaders/VRMLLoader.js +10 -10
- package/examples/jsm/loaders/VTKLoader.js +4 -3
- package/examples/jsm/loaders/XYZLoader.js +3 -2
- package/examples/jsm/misc/Timer.js +1 -1
- package/examples/jsm/modifiers/CurveModifierGPU.js +233 -0
- package/examples/jsm/objects/LensflareMesh.js +322 -0
- package/examples/jsm/objects/SkyMesh.js +1 -2
- package/examples/jsm/objects/Water2Mesh.js +2 -3
- package/examples/jsm/objects/WaterMesh.js +1 -2
- package/examples/jsm/physics/JoltPhysics.js +1 -1
- package/examples/jsm/physics/RapierPhysics.js +1 -1
- package/examples/jsm/transpiler/GLSLDecoder.js +1 -1
- package/examples/jsm/transpiler/ShaderToyDecoder.js +2 -2
- package/examples/jsm/utils/GeometryCompressionUtils.js +37 -122
- package/examples/jsm/utils/ShadowMapViewer.js +3 -8
- package/examples/jsm/utils/ShadowMapViewerGPU.js +201 -0
- package/examples/jsm/utils/SkeletonUtils.js +84 -66
- package/examples/jsm/utils/TextureUtils.js +1 -0
- package/examples/jsm/utils/TextureUtilsGPU.js +63 -0
- package/examples/jsm/webxr/XRControllerModelFactory.js +1 -1
- package/package.json +2 -2
- package/src/Three.WebGPU.Nodes.js +200 -0
- package/src/Three.WebGPU.js +2 -1
- package/src/audio/Audio.js +2 -2
- package/src/constants.js +1 -1
- package/src/core/BufferAttribute.js +0 -9
- package/src/core/Clock.js +1 -1
- package/src/core/InterleavedBuffer.js +0 -9
- package/src/extras/Controls.js +1 -1
- package/src/geometries/CylinderGeometry.js +11 -4
- package/src/loaders/MaterialLoader.js +7 -1
- package/src/loaders/nodes/NodeLoader.js +24 -4
- package/src/loaders/nodes/NodeMaterialLoader.js +21 -17
- package/src/loaders/nodes/NodeObjectLoader.js +19 -0
- package/src/materials/nodes/InstancedPointsNodeMaterial.js +19 -34
- package/src/materials/nodes/Line2NodeMaterial.js +26 -26
- package/src/materials/nodes/LineBasicNodeMaterial.js +7 -3
- package/src/materials/nodes/LineDashedNodeMaterial.js +7 -3
- package/src/materials/nodes/MeshBasicNodeMaterial.js +7 -3
- package/src/materials/nodes/MeshLambertNodeMaterial.js +7 -3
- package/src/materials/nodes/MeshMatcapNodeMaterial.js +7 -3
- package/src/materials/nodes/MeshNormalNodeMaterial.js +7 -3
- package/src/materials/nodes/MeshPhongNodeMaterial.js +7 -3
- package/src/materials/nodes/MeshPhysicalNodeMaterial.js +6 -3
- package/src/materials/nodes/MeshSSSNodeMaterial.js +6 -3
- package/src/materials/nodes/MeshStandardNodeMaterial.js +7 -3
- package/src/materials/nodes/MeshToonNodeMaterial.js +7 -3
- package/src/materials/nodes/NodeMaterial.js +20 -45
- package/src/materials/nodes/NodeMaterials.js +2 -0
- package/src/materials/nodes/PointsNodeMaterial.js +7 -3
- package/src/materials/nodes/ShadowNodeMaterial.js +7 -3
- package/src/materials/nodes/SpriteNodeMaterial.js +39 -6
- package/src/materials/nodes/VolumeNodeMaterial.js +13 -9
- package/src/materials/nodes/manager/NodeMaterialObserver.js +302 -0
- package/src/math/Triangle.js +24 -0
- package/src/nodes/Nodes.js +3 -3
- package/src/nodes/TSL.js +96 -93
- package/src/nodes/accessors/BatchNode.js +7 -3
- package/src/nodes/accessors/BufferAttributeNode.js +6 -3
- package/src/nodes/accessors/BufferNode.js +6 -3
- package/src/nodes/accessors/Camera.js +10 -16
- package/src/nodes/accessors/ClippingNode.js +7 -3
- package/src/nodes/accessors/CubeTextureNode.js +6 -3
- package/src/nodes/accessors/InstanceNode.js +11 -11
- package/src/nodes/accessors/InstancedPointsMaterialNode.js +6 -3
- package/src/nodes/accessors/Lights.js +51 -0
- package/src/nodes/accessors/MaterialNode.js +8 -4
- package/src/nodes/accessors/MaterialReferenceNode.js +6 -3
- package/src/nodes/accessors/ModelNode.js +42 -7
- package/src/nodes/accessors/ModelViewProjectionNode.js +9 -5
- package/src/nodes/accessors/MorphNode.js +7 -3
- package/src/nodes/accessors/Normal.js +32 -6
- package/src/nodes/accessors/Object3DNode.js +11 -27
- package/src/nodes/accessors/PointUVNode.js +7 -3
- package/src/nodes/accessors/ReferenceBaseNode.js +32 -4
- package/src/nodes/accessors/ReferenceNode.js +40 -3
- package/src/nodes/accessors/RendererReferenceNode.js +9 -3
- package/src/nodes/accessors/SceneNode.js +7 -3
- package/src/nodes/accessors/SkinningNode.js +7 -3
- package/src/nodes/accessors/StorageBufferNode.js +21 -3
- package/src/nodes/accessors/StorageTextureNode.js +7 -4
- package/src/nodes/accessors/Texture3DNode.js +7 -4
- package/src/nodes/accessors/TextureNode.js +19 -8
- package/src/nodes/accessors/TextureSizeNode.js +8 -5
- package/src/nodes/accessors/UniformArrayNode.js +12 -9
- package/src/nodes/accessors/UserDataNode.js +9 -6
- package/src/nodes/accessors/VelocityNode.js +74 -23
- package/src/nodes/accessors/VertexColorNode.js +6 -3
- package/src/nodes/code/CodeNode.js +7 -3
- package/src/nodes/code/ExpressionNode.js +8 -4
- package/src/nodes/code/FunctionCallNode.js +6 -3
- package/src/nodes/code/FunctionNode.js +6 -3
- package/src/nodes/code/ScriptableNode.js +11 -6
- package/src/nodes/code/ScriptableValueNode.js +7 -3
- package/src/nodes/core/AssignNode.js +9 -6
- package/src/nodes/core/AttributeNode.js +7 -3
- package/src/nodes/core/BypassNode.js +8 -4
- package/src/nodes/core/CacheNode.js +8 -4
- package/src/nodes/core/ConstNode.js +6 -3
- package/src/nodes/core/ContextNode.js +7 -3
- package/src/nodes/core/IndexNode.js +25 -3
- package/src/nodes/core/InputNode.js +7 -3
- package/src/nodes/core/MRTNode.js +6 -3
- package/src/nodes/core/Node.js +10 -51
- package/src/nodes/core/NodeBuilder.js +71 -5
- package/src/nodes/core/NodeUtils.js +48 -6
- package/src/nodes/core/OutputStructNode.js +8 -4
- package/src/nodes/core/ParameterNode.js +6 -3
- package/src/nodes/core/PropertyNode.js +7 -3
- package/src/nodes/core/StackNode.js +7 -3
- package/src/nodes/core/StructTypeNode.js +7 -3
- package/src/nodes/core/TempNode.js +8 -4
- package/src/nodes/core/UniformGroupNode.js +10 -6
- package/src/nodes/core/UniformNode.js +6 -3
- package/src/nodes/core/VarNode.js +8 -4
- package/src/nodes/core/VaryingNode.js +7 -3
- package/src/nodes/display/AfterImageNode.js +6 -0
- package/src/nodes/display/AnaglyphPassNode.js +6 -0
- package/src/nodes/display/AnamorphicNode.js +6 -0
- package/src/nodes/display/BloomNode.js +6 -0
- package/src/nodes/display/BumpMapNode.js +6 -0
- package/src/nodes/display/ColorSpaceFunctions.js +4 -4
- package/src/nodes/display/ColorSpaceNode.js +43 -14
- package/src/nodes/display/DenoiseNode.js +6 -3
- package/src/nodes/display/DepthOfFieldNode.js +6 -3
- package/src/nodes/display/DotScreenNode.js +8 -5
- package/src/nodes/display/FXAANode.js +6 -3
- package/src/nodes/display/FilmNode.js +6 -3
- package/src/nodes/display/FrontFacingNode.js +7 -3
- package/src/nodes/display/GTAONode.js +6 -3
- package/src/nodes/display/GaussianBlurNode.js +6 -3
- package/src/nodes/display/Lut3DNode.js +6 -3
- package/src/nodes/display/NormalMapNode.js +8 -6
- package/src/nodes/display/ParallaxBarrierPassNode.js +8 -5
- package/src/nodes/display/PassNode.js +18 -7
- package/src/nodes/display/PixelationPassNode.js +12 -5
- package/src/nodes/display/PosterizeNode.js +6 -3
- package/src/nodes/display/RGBShiftNode.js +6 -3
- package/src/nodes/display/RenderOutputNode.js +12 -8
- package/src/nodes/display/SSAAPassNode.js +6 -3
- package/src/nodes/display/ScreenNode.js +181 -0
- package/src/nodes/display/SobelOperatorNode.js +6 -3
- package/src/nodes/display/StereoCompositePassNode.js +6 -3
- package/src/nodes/display/StereoPassNode.js +6 -3
- package/src/nodes/display/ToneMappingFunctions.js +12 -12
- package/src/nodes/display/ToneMappingNode.js +8 -7
- package/src/nodes/display/ToonOutlinePassNode.js +111 -0
- package/src/nodes/display/TransitionNode.js +6 -3
- package/src/nodes/display/ViewportDepthNode.js +7 -3
- package/src/nodes/display/ViewportDepthTextureNode.js +8 -5
- package/src/nodes/display/ViewportSharedTextureNode.js +8 -5
- package/src/nodes/display/ViewportTextureNode.js +8 -5
- package/src/nodes/fog/FogExp2Node.js +6 -3
- package/src/nodes/fog/FogNode.js +7 -3
- package/src/nodes/fog/FogRangeNode.js +6 -3
- package/src/nodes/functions/PhysicalLightingModel.js +2 -2
- package/src/nodes/functions/material/getShIrradianceAt.js +28 -0
- package/src/nodes/geometry/RangeNode.js +7 -3
- package/src/nodes/gpgpu/AtomicFunctionNode.js +99 -0
- package/src/nodes/gpgpu/BarrierNode.js +40 -0
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +98 -0
- package/src/nodes/gpgpu/ComputeNode.js +8 -4
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +100 -0
- package/src/nodes/lighting/AONode.js +6 -3
- package/src/nodes/lighting/AmbientLightNode.js +6 -3
- package/src/nodes/lighting/AnalyticLightNode.js +198 -30
- package/src/nodes/lighting/BasicEnvironmentNode.js +6 -3
- package/src/nodes/lighting/BasicLightMapNode.js +6 -3
- package/src/nodes/lighting/DirectionalLightNode.js +7 -4
- package/src/nodes/lighting/EnvironmentNode.js +6 -3
- package/src/nodes/lighting/HemisphereLightNode.js +10 -6
- package/src/nodes/lighting/IESSpotLightNode.js +6 -3
- package/src/nodes/lighting/IrradianceNode.js +6 -3
- package/src/nodes/lighting/LightProbeNode.js +8 -31
- package/src/nodes/lighting/LightingContextNode.js +6 -3
- package/src/nodes/lighting/LightingNode.js +7 -3
- package/src/nodes/lighting/LightsNode.js +24 -5
- package/src/nodes/lighting/PointLightNode.js +11 -7
- package/src/nodes/lighting/RectAreaLightNode.js +11 -7
- package/src/nodes/lighting/SpotLightNode.js +13 -10
- package/src/nodes/math/ConditionalNode.js +23 -6
- package/src/nodes/math/MathNode.js +6 -3
- package/src/nodes/math/OperatorNode.js +6 -3
- package/src/nodes/pmrem/PMREMNode.js +6 -3
- package/src/nodes/utils/ArrayElementNode.js +8 -4
- package/src/nodes/utils/ConvertNode.js +7 -3
- package/src/nodes/utils/CubeMapNode.js +6 -3
- package/src/nodes/utils/EquirectUVNode.js +6 -3
- package/src/nodes/utils/FlipNode.js +7 -4
- package/src/nodes/utils/FunctionOverloadingNode.js +7 -3
- package/src/nodes/utils/JoinNode.js +6 -3
- package/src/nodes/utils/LoopNode.js +7 -3
- package/src/nodes/utils/MatcapUVNode.js +6 -3
- package/src/nodes/utils/MaxMipLevelNode.js +6 -3
- package/src/nodes/utils/OscNode.js +7 -3
- package/src/nodes/utils/RTTNode.js +6 -3
- package/src/nodes/utils/ReflectorNode.js +8 -5
- package/src/nodes/utils/RemapNode.js +7 -3
- package/src/nodes/utils/RotateNode.js +6 -3
- package/src/nodes/utils/SetNode.js +7 -4
- package/src/nodes/utils/SplitNode.js +7 -3
- package/src/nodes/utils/SpriteSheetUVNode.js +7 -3
- package/src/nodes/utils/StorageArrayElementNode.js +9 -8
- package/src/nodes/utils/TimerNode.js +6 -3
- package/src/nodes/utils/TriplanarTexturesNode.js +7 -3
- package/src/nodes/utils/ViewportUtils.js +2 -2
- package/src/objects/BatchedMesh.js +76 -10
- package/src/objects/LOD.js +21 -0
- package/src/objects/Line.js +1 -0
- package/src/objects/Mesh.js +7 -23
- package/src/objects/Points.js +2 -0
- package/src/renderers/WebGLRenderer.js +65 -50
- package/src/renderers/common/BundleGroup.js +26 -0
- package/src/renderers/common/ClippingContext.js +4 -3
- package/src/renderers/common/RenderContext.js +4 -5
- package/src/renderers/common/RenderObject.js +116 -5
- package/src/renderers/common/RenderObjects.js +8 -1
- package/src/renderers/common/Renderer.js +57 -49
- package/src/renderers/common/extras/PMREMGenerator.js +7 -9
- package/src/renderers/common/nodes/NodeBuilderState.js +3 -3
- package/src/renderers/common/nodes/Nodes.js +33 -14
- package/src/renderers/shaders/ShaderLib/sprite.glsl.js +2 -4
- package/src/renderers/webgl/WebGLAttributes.js +45 -14
- package/src/renderers/webgl/WebGLCapabilities.js +9 -0
- package/src/renderers/webgl/WebGLProgram.js +2 -0
- package/src/renderers/webgl/WebGLPrograms.js +21 -17
- package/src/renderers/webgl/WebGLState.js +21 -0
- package/src/renderers/webgl/WebGLTextures.js +22 -0
- package/src/renderers/webgl-fallback/WebGLBackend.js +50 -45
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +4 -4
- package/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js +6 -0
- package/src/renderers/webgl-fallback/utils/WebGLState.js +1 -4
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +61 -16
- package/src/renderers/webgpu/WebGPUBackend.js +33 -25
- package/src/renderers/webgpu/WebGPURenderer.Nodes.js +42 -0
- package/src/renderers/webgpu/WebGPURenderer.js +5 -2
- package/src/renderers/webgpu/nodes/BasicNodeLibrary.js +59 -0
- package/src/renderers/{common → webgpu}/nodes/StandardNodeLibrary.js +11 -11
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +91 -11
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +6 -16
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +1 -1
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +7 -5
- package/src/renderers/webgpu/utils/WebGPUUtils.js +1 -1
- package/src/utils.js +33 -1
- package/examples/jsm/geometries/SDFGeometryGenerator.js +0 -144
- package/examples/jsm/loaders/TiltLoader.js +0 -520
- package/examples/jsm/utils/GPUStatsPanel.js +0 -95
- package/examples/jsm/utils/PackedPhongMaterial.js +0 -178
- package/src/nodes/display/ViewportNode.js +0 -138
- package/src/nodes/lighting/LightNode.js +0 -57
- package/src/renderers/common/StandardRenderer.js +0 -18
- package/src/renderers/webvr/WebVRManager.js +0 -495
- package/src/renderers/webvr/WebVRUtils.js +0 -66
package/src/nodes/core/Node.js
CHANGED
|
@@ -4,12 +4,16 @@ import { getNodeChildren, getCacheKey } from './NodeUtils.js';
|
|
|
4
4
|
import { EventDispatcher } from '../../core/EventDispatcher.js';
|
|
5
5
|
import { MathUtils } from '../../math/MathUtils.js';
|
|
6
6
|
|
|
7
|
-
const Nodes = new Map();
|
|
8
|
-
|
|
9
7
|
let _nodeId = 0;
|
|
10
8
|
|
|
11
9
|
class Node extends EventDispatcher {
|
|
12
10
|
|
|
11
|
+
static get type() {
|
|
12
|
+
|
|
13
|
+
return 'Node';
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
constructor( nodeType = null ) {
|
|
14
18
|
|
|
15
19
|
super();
|
|
@@ -357,6 +361,10 @@ class Node extends EventDispatcher {
|
|
|
357
361
|
|
|
358
362
|
nodeData.snippet = result;
|
|
359
363
|
|
|
364
|
+
} else if ( nodeData.flowCodes !== undefined && builder.context.nodeBlock !== undefined ) {
|
|
365
|
+
|
|
366
|
+
builder.addFlowCodeHierarchy( this, builder.context.nodeBlock );
|
|
367
|
+
|
|
360
368
|
}
|
|
361
369
|
|
|
362
370
|
result = builder.format( result, type, output );
|
|
@@ -540,52 +548,3 @@ class Node extends EventDispatcher {
|
|
|
540
548
|
}
|
|
541
549
|
|
|
542
550
|
export default Node;
|
|
543
|
-
|
|
544
|
-
Node.type = /*@__PURE__*/ registerNode( '', Node );
|
|
545
|
-
|
|
546
|
-
export function registerNode( type, nodeClass ) {
|
|
547
|
-
|
|
548
|
-
const suffix = 'Node';
|
|
549
|
-
const nodeType = type + suffix;
|
|
550
|
-
|
|
551
|
-
if ( typeof nodeClass !== 'function' ) throw new Error( `TSL.Node: Node class ${ type } is not a class` );
|
|
552
|
-
|
|
553
|
-
if ( Nodes.has( nodeType ) ) {
|
|
554
|
-
|
|
555
|
-
console.warn( `TSL.Node: Redefinition of node class ${ nodeType }` );
|
|
556
|
-
return;
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
if ( type.slice( - suffix.length ) === suffix ) {
|
|
561
|
-
|
|
562
|
-
console.warn( `TSL.Node: Node class ${ nodeType } should not have '${ suffix }' suffix.` );
|
|
563
|
-
return;
|
|
564
|
-
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
Nodes.set( nodeType, nodeClass );
|
|
568
|
-
nodeClass.type = nodeType;
|
|
569
|
-
|
|
570
|
-
return nodeType;
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
export function createNodeFromType( type ) {
|
|
575
|
-
|
|
576
|
-
const Class = Nodes.get( type );
|
|
577
|
-
|
|
578
|
-
if ( Class !== undefined ) {
|
|
579
|
-
|
|
580
|
-
return new Class();
|
|
581
|
-
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
export function addNodeClass( type, nodeClass ) {
|
|
587
|
-
|
|
588
|
-
console.warn( 'TSL.Node: Function addNodeClass() is deprecated. Use /*@__PURE__*/ registerNode() instead.' );
|
|
589
|
-
/*@__PURE__*/ registerNode( type.slice( 0, - 4 ), nodeClass );
|
|
590
|
-
|
|
591
|
-
}
|
|
@@ -79,6 +79,8 @@ class NodeBuilder {
|
|
|
79
79
|
this.updateAfterNodes = [];
|
|
80
80
|
this.hashNodes = {};
|
|
81
81
|
|
|
82
|
+
this.monitor = null;
|
|
83
|
+
|
|
82
84
|
this.lightsNode = null;
|
|
83
85
|
this.environmentNode = null;
|
|
84
86
|
this.fogNode = null;
|
|
@@ -107,8 +109,6 @@ class NodeBuilder {
|
|
|
107
109
|
this.stacks = [];
|
|
108
110
|
this.tab = '\t';
|
|
109
111
|
|
|
110
|
-
this.instanceBindGroups = true;
|
|
111
|
-
|
|
112
112
|
this.currentFunctionNode = null;
|
|
113
113
|
|
|
114
114
|
this.context = {
|
|
@@ -277,6 +277,23 @@ class NodeBuilder {
|
|
|
277
277
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
+
sortBindingGroups() {
|
|
281
|
+
|
|
282
|
+
const bindingsGroups = this.getBindings();
|
|
283
|
+
|
|
284
|
+
bindingsGroups.sort( ( a, b ) => ( a.bindings[ 0 ].groupNode.order - b.bindings[ 0 ].groupNode.order ) );
|
|
285
|
+
|
|
286
|
+
for ( let i = 0; i < bindingsGroups.length; i ++ ) {
|
|
287
|
+
|
|
288
|
+
const bindingGroup = bindingsGroups[ i ];
|
|
289
|
+
this.bindingsIndexes[ bindingGroup.name ].group = i;
|
|
290
|
+
|
|
291
|
+
bindingGroup.index = i;
|
|
292
|
+
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
}
|
|
296
|
+
|
|
280
297
|
setHashNode( node, hash ) {
|
|
281
298
|
|
|
282
299
|
this.hashNodes[ hash ] = node;
|
|
@@ -311,13 +328,13 @@ class NodeBuilder {
|
|
|
311
328
|
|
|
312
329
|
if ( updateBeforeType !== NodeUpdateType.NONE ) {
|
|
313
330
|
|
|
314
|
-
this.updateBeforeNodes.push( node );
|
|
331
|
+
this.updateBeforeNodes.push( node.getSelf() );
|
|
315
332
|
|
|
316
333
|
}
|
|
317
334
|
|
|
318
335
|
if ( updateAfterType !== NodeUpdateType.NONE ) {
|
|
319
336
|
|
|
320
|
-
this.updateAfterNodes.push( node );
|
|
337
|
+
this.updateAfterNodes.push( node.getSelf() );
|
|
321
338
|
|
|
322
339
|
}
|
|
323
340
|
|
|
@@ -924,10 +941,59 @@ class NodeBuilder {
|
|
|
924
941
|
|
|
925
942
|
}
|
|
926
943
|
|
|
927
|
-
|
|
944
|
+
addFlowCodeHierarchy( node, nodeBlock ) {
|
|
945
|
+
|
|
946
|
+
const { flowCodes, flowCodeBlock } = this.getDataFromNode( node );
|
|
947
|
+
|
|
948
|
+
let needsFlowCode = true;
|
|
949
|
+
let nodeBlockHierarchy = nodeBlock;
|
|
950
|
+
|
|
951
|
+
while ( nodeBlockHierarchy ) {
|
|
952
|
+
|
|
953
|
+
if ( flowCodeBlock.get( nodeBlockHierarchy ) === true ) {
|
|
954
|
+
|
|
955
|
+
needsFlowCode = false;
|
|
956
|
+
break;
|
|
957
|
+
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
nodeBlockHierarchy = this.getDataFromNode( nodeBlockHierarchy ).parentNodeBlock;
|
|
961
|
+
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
if ( needsFlowCode ) {
|
|
965
|
+
|
|
966
|
+
for ( const flowCode of flowCodes ) {
|
|
967
|
+
|
|
968
|
+
this.addLineFlowCode( flowCode );
|
|
969
|
+
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
addLineFlowCodeBlock( node, code, nodeBlock ) {
|
|
977
|
+
|
|
978
|
+
const nodeData = this.getDataFromNode( node );
|
|
979
|
+
const flowCodes = nodeData.flowCodes || ( nodeData.flowCodes = [] );
|
|
980
|
+
const codeBlock = nodeData.flowCodeBlock || ( nodeData.flowCodeBlock = new WeakMap() );
|
|
981
|
+
|
|
982
|
+
flowCodes.push( code );
|
|
983
|
+
codeBlock.set( nodeBlock, true );
|
|
984
|
+
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
addLineFlowCode( code, node = null ) {
|
|
928
988
|
|
|
929
989
|
if ( code === '' ) return this;
|
|
930
990
|
|
|
991
|
+
if ( node !== null && this.context.nodeBlock ) {
|
|
992
|
+
|
|
993
|
+
this.addLineFlowCodeBlock( node, code, this.context.nodeBlock );
|
|
994
|
+
|
|
995
|
+
}
|
|
996
|
+
|
|
931
997
|
code = this.tab + code;
|
|
932
998
|
|
|
933
999
|
if ( ! /;\s*$/.test( code ) ) {
|
|
@@ -5,26 +5,68 @@ import { Vector2 } from '../../math/Vector2.js';
|
|
|
5
5
|
import { Vector3 } from '../../math/Vector3.js';
|
|
6
6
|
import { Vector4 } from '../../math/Vector4.js';
|
|
7
7
|
|
|
8
|
+
// cyrb53 (c) 2018 bryc (github.com/bryc). License: Public domain. Attribution appreciated.
|
|
9
|
+
// A fast and simple 64-bit (or 53-bit) string hash function with decent collision resistance.
|
|
10
|
+
// Largely inspired by MurmurHash2/3, but with a focus on speed/simplicity.
|
|
11
|
+
// See https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript/52171480#52171480
|
|
12
|
+
// https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js
|
|
13
|
+
function cyrb53( value, seed = 0 ) {
|
|
14
|
+
|
|
15
|
+
let h1 = 0xdeadbeef ^ seed, h2 = 0x41c6ce57 ^ seed;
|
|
16
|
+
|
|
17
|
+
if ( value instanceof Array ) {
|
|
18
|
+
|
|
19
|
+
for ( let i = 0, val; i < value.length; i ++ ) {
|
|
20
|
+
|
|
21
|
+
val = value[ i ];
|
|
22
|
+
h1 = Math.imul( h1 ^ val, 2654435761 );
|
|
23
|
+
h2 = Math.imul( h2 ^ val, 1597334677 );
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
} else {
|
|
28
|
+
|
|
29
|
+
for ( let i = 0, ch; i < value.length; i ++ ) {
|
|
30
|
+
|
|
31
|
+
ch = value.charCodeAt( i );
|
|
32
|
+
h1 = Math.imul( h1 ^ ch, 2654435761 );
|
|
33
|
+
h2 = Math.imul( h2 ^ ch, 1597334677 );
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
h1 = Math.imul( h1 ^ ( h1 >>> 16 ), 2246822507 );
|
|
40
|
+
h1 ^= Math.imul( h2 ^ ( h2 >>> 13 ), 3266489909 );
|
|
41
|
+
h2 = Math.imul( h2 ^ ( h2 >>> 16 ), 2246822507 );
|
|
42
|
+
h2 ^= Math.imul( h1 ^ ( h1 >>> 13 ), 3266489909 );
|
|
43
|
+
|
|
44
|
+
return 4294967296 * ( 2097151 & h2 ) + ( h1 >>> 0 );
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const hashString = ( str ) => cyrb53( str );
|
|
49
|
+
export const hashArray = ( array ) => cyrb53( array );
|
|
50
|
+
export const hash = ( ...params ) => cyrb53( params );
|
|
51
|
+
|
|
8
52
|
export function getCacheKey( object, force = false ) {
|
|
9
53
|
|
|
10
|
-
|
|
54
|
+
const values = [];
|
|
11
55
|
|
|
12
56
|
if ( object.isNode === true ) {
|
|
13
57
|
|
|
14
|
-
|
|
58
|
+
values.push( object.id );
|
|
15
59
|
object = object.getSelf();
|
|
16
60
|
|
|
17
61
|
}
|
|
18
62
|
|
|
19
63
|
for ( const { property, childNode } of getNodeChildren( object ) ) {
|
|
20
64
|
|
|
21
|
-
|
|
65
|
+
values.push( values, cyrb53( property.slice( 0, - 4 ) ), childNode.getCacheKey( force ) );
|
|
22
66
|
|
|
23
67
|
}
|
|
24
68
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return cacheKey;
|
|
69
|
+
return cyrb53( values );
|
|
28
70
|
|
|
29
71
|
}
|
|
30
72
|
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
import StructTypeNode from './StructTypeNode.js';
|
|
3
3
|
import { nodeProxy } from '../tsl/TSLBase.js';
|
|
4
4
|
|
|
5
5
|
class OutputStructNode extends Node {
|
|
6
6
|
|
|
7
|
+
static get type() {
|
|
8
|
+
|
|
9
|
+
return 'OutputStructNode';
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
constructor( ...members ) {
|
|
8
14
|
|
|
9
15
|
super();
|
|
@@ -42,7 +48,7 @@ class OutputStructNode extends Node {
|
|
|
42
48
|
|
|
43
49
|
const snippet = members[ i ].build( builder, output );
|
|
44
50
|
|
|
45
|
-
builder.addLineFlowCode( `${ structPrefix }m${ i } = ${ snippet }
|
|
51
|
+
builder.addLineFlowCode( `${ structPrefix }m${ i } = ${ snippet }`, this );
|
|
46
52
|
|
|
47
53
|
}
|
|
48
54
|
|
|
@@ -54,6 +60,4 @@ class OutputStructNode extends Node {
|
|
|
54
60
|
|
|
55
61
|
export default OutputStructNode;
|
|
56
62
|
|
|
57
|
-
OutputStructNode.type = /*@__PURE__*/ registerNode( 'OutputStruct', OutputStructNode );
|
|
58
|
-
|
|
59
63
|
export const outputStruct = /*@__PURE__*/ nodeProxy( OutputStructNode );
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { registerNode } from './Node.js';
|
|
2
1
|
import { nodeObject } from '../tsl/TSLBase.js';
|
|
3
2
|
import PropertyNode from './PropertyNode.js';
|
|
4
3
|
|
|
5
4
|
class ParameterNode extends PropertyNode {
|
|
6
5
|
|
|
6
|
+
static get type() {
|
|
7
|
+
|
|
8
|
+
return 'ParameterNode';
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
7
12
|
constructor( nodeType, name = null ) {
|
|
8
13
|
|
|
9
14
|
super( nodeType, name );
|
|
@@ -28,6 +33,4 @@ class ParameterNode extends PropertyNode {
|
|
|
28
33
|
|
|
29
34
|
export default ParameterNode;
|
|
30
35
|
|
|
31
|
-
ParameterNode.type = /*@__PURE__*/ registerNode( 'Parameter', ParameterNode );
|
|
32
|
-
|
|
33
36
|
export const parameter = ( type, name ) => nodeObject( new ParameterNode( type, name ) );
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
import { nodeImmutable, nodeObject } from '../tsl/TSLCore.js';
|
|
3
3
|
|
|
4
4
|
class PropertyNode extends Node {
|
|
5
5
|
|
|
6
|
+
static get type() {
|
|
7
|
+
|
|
8
|
+
return 'PropertyNode';
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
constructor( nodeType, name = null, varying = false ) {
|
|
7
13
|
|
|
8
14
|
super( nodeType );
|
|
@@ -49,8 +55,6 @@ class PropertyNode extends Node {
|
|
|
49
55
|
|
|
50
56
|
export default PropertyNode;
|
|
51
57
|
|
|
52
|
-
PropertyNode.type = /*@__PURE__*/ registerNode( 'Property', PropertyNode );
|
|
53
|
-
|
|
54
58
|
export const property = ( type, name ) => nodeObject( new PropertyNode( type, name ) );
|
|
55
59
|
export const varyingProperty = ( type, name ) => nodeObject( new PropertyNode( type, name, true ) );
|
|
56
60
|
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
import { select } from '../math/ConditionalNode.js';
|
|
3
3
|
import { ShaderNode, nodeProxy, getCurrentStack, setCurrentStack } from '../tsl/TSLBase.js';
|
|
4
4
|
|
|
5
5
|
class StackNode extends Node {
|
|
6
6
|
|
|
7
|
+
static get type() {
|
|
8
|
+
|
|
9
|
+
return 'StackNode';
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
constructor( parent = null ) {
|
|
8
14
|
|
|
9
15
|
super();
|
|
@@ -100,6 +106,4 @@ class StackNode extends Node {
|
|
|
100
106
|
|
|
101
107
|
export default StackNode;
|
|
102
108
|
|
|
103
|
-
StackNode.type = /*@__PURE__*/ registerNode( 'Stack', StackNode );
|
|
104
|
-
|
|
105
109
|
export const stack = /*@__PURE__*/ nodeProxy( StackNode );
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
|
|
3
3
|
class StructTypeNode extends Node {
|
|
4
4
|
|
|
5
|
+
static get type() {
|
|
6
|
+
|
|
7
|
+
return 'StructTypeNode';
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
constructor( types ) {
|
|
6
12
|
|
|
7
13
|
super();
|
|
@@ -20,5 +26,3 @@ class StructTypeNode extends Node {
|
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
export default StructTypeNode;
|
|
23
|
-
|
|
24
|
-
StructTypeNode.type = /*@__PURE__*/ registerNode( 'StructType', StructTypeNode );
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
|
|
3
3
|
class TempNode extends Node {
|
|
4
4
|
|
|
5
|
+
static get type() {
|
|
6
|
+
|
|
7
|
+
return 'TempNode';
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
constructor( type ) {
|
|
6
12
|
|
|
7
13
|
super( type );
|
|
@@ -36,7 +42,7 @@ class TempNode extends Node {
|
|
|
36
42
|
const nodeVar = builder.getVarFromNode( this, null, type );
|
|
37
43
|
const propertyName = builder.getPropertyName( nodeVar );
|
|
38
44
|
|
|
39
|
-
builder.addLineFlowCode( `${propertyName} = ${snippet}
|
|
45
|
+
builder.addLineFlowCode( `${propertyName} = ${snippet}`, this );
|
|
40
46
|
|
|
41
47
|
nodeData.snippet = snippet;
|
|
42
48
|
nodeData.propertyName = propertyName;
|
|
@@ -54,5 +60,3 @@ class TempNode extends Node {
|
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
export default TempNode;
|
|
57
|
-
|
|
58
|
-
TempNode.type = /*@__PURE__*/ registerNode( 'Temp', TempNode );
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
|
|
3
3
|
class UniformGroupNode extends Node {
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
static get type() {
|
|
6
|
+
|
|
7
|
+
return 'UniformGroupNode';
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
constructor( name, shared = false, order = 1 ) {
|
|
6
12
|
|
|
7
13
|
super( 'string' );
|
|
8
14
|
|
|
@@ -10,7 +16,7 @@ class UniformGroupNode extends Node {
|
|
|
10
16
|
this.version = 0;
|
|
11
17
|
|
|
12
18
|
this.shared = shared;
|
|
13
|
-
|
|
19
|
+
this.order = order;
|
|
14
20
|
this.isUniformGroup = true;
|
|
15
21
|
|
|
16
22
|
}
|
|
@@ -45,10 +51,8 @@ class UniformGroupNode extends Node {
|
|
|
45
51
|
|
|
46
52
|
export default UniformGroupNode;
|
|
47
53
|
|
|
48
|
-
UniformGroupNode.type = /*@__PURE__*/ registerNode( 'UniformGroup', UniformGroupNode );
|
|
49
|
-
|
|
50
54
|
export const uniformGroup = ( name ) => new UniformGroupNode( name );
|
|
51
|
-
export const sharedUniformGroup = ( name ) => new UniformGroupNode( name, true );
|
|
55
|
+
export const sharedUniformGroup = ( name, order = 0 ) => new UniformGroupNode( name, true, order );
|
|
52
56
|
|
|
53
57
|
export const frameGroup = /*@__PURE__*/ sharedUniformGroup( 'frame' );
|
|
54
58
|
export const renderGroup = /*@__PURE__*/ sharedUniformGroup( 'render' );
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { registerNode } from './Node.js';
|
|
2
1
|
import InputNode from './InputNode.js';
|
|
3
2
|
import { objectGroup } from './UniformGroupNode.js';
|
|
4
3
|
import { nodeObject, getConstNodeType } from '../tsl/TSLCore.js';
|
|
5
4
|
|
|
6
5
|
class UniformNode extends InputNode {
|
|
7
6
|
|
|
7
|
+
static get type() {
|
|
8
|
+
|
|
9
|
+
return 'UniformNode';
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
constructor( value, nodeType = null ) {
|
|
9
14
|
|
|
10
15
|
super( value, nodeType );
|
|
@@ -95,8 +100,6 @@ class UniformNode extends InputNode {
|
|
|
95
100
|
|
|
96
101
|
export default UniformNode;
|
|
97
102
|
|
|
98
|
-
UniformNode.type = /*@__PURE__*/ registerNode( 'Uniform', UniformNode );
|
|
99
|
-
|
|
100
103
|
export const uniform = ( arg1, arg2 ) => {
|
|
101
104
|
|
|
102
105
|
const nodeType = getConstNodeType( arg2 || arg1 );
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
import { addMethodChaining, nodeProxy } from '../tsl/TSLCore.js';
|
|
3
3
|
|
|
4
4
|
class VarNode extends Node {
|
|
5
5
|
|
|
6
|
+
static get type() {
|
|
7
|
+
|
|
8
|
+
return 'VarNode';
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
constructor( node, name = null ) {
|
|
7
13
|
|
|
8
14
|
super();
|
|
@@ -38,7 +44,7 @@ class VarNode extends Node {
|
|
|
38
44
|
|
|
39
45
|
const snippet = node.build( builder, nodeVar.type );
|
|
40
46
|
|
|
41
|
-
builder.addLineFlowCode( `${propertyName} = ${snippet}
|
|
47
|
+
builder.addLineFlowCode( `${propertyName} = ${snippet}`, this );
|
|
42
48
|
|
|
43
49
|
return propertyName;
|
|
44
50
|
|
|
@@ -48,8 +54,6 @@ class VarNode extends Node {
|
|
|
48
54
|
|
|
49
55
|
export default VarNode;
|
|
50
56
|
|
|
51
|
-
VarNode.type = /*@__PURE__*/ registerNode( 'Var', VarNode );
|
|
52
|
-
|
|
53
57
|
export const temp = /*@__PURE__*/ nodeProxy( VarNode );
|
|
54
58
|
|
|
55
59
|
addMethodChaining( 'temp', temp ); // @TODO: Will be removed in the future
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import Node
|
|
1
|
+
import Node from './Node.js';
|
|
2
2
|
import { NodeShaderStage } from './constants.js';
|
|
3
3
|
import { addMethodChaining, nodeProxy } from '../tsl/TSLCore.js';
|
|
4
4
|
|
|
5
5
|
class VaryingNode extends Node {
|
|
6
6
|
|
|
7
|
+
static get type() {
|
|
8
|
+
|
|
9
|
+
return 'VaryingNode';
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
constructor( node, name = null ) {
|
|
8
14
|
|
|
9
15
|
super();
|
|
@@ -97,8 +103,6 @@ class VaryingNode extends Node {
|
|
|
97
103
|
|
|
98
104
|
export default VaryingNode;
|
|
99
105
|
|
|
100
|
-
VaryingNode.type = /*@__PURE__*/ registerNode( 'Varying', VaryingNode );
|
|
101
|
-
|
|
102
106
|
export const varying = /*@__PURE__*/ nodeProxy( VaryingNode );
|
|
103
107
|
|
|
104
108
|
addMethodChaining( 'varying', varying );
|
|
@@ -8,6 +8,12 @@ import NodeMaterial from '../../materials/nodes/NodeMaterial.js';
|
|
|
8
8
|
|
|
9
9
|
class AnaglyphPassNode extends StereoCompositePassNode {
|
|
10
10
|
|
|
11
|
+
static get type() {
|
|
12
|
+
|
|
13
|
+
return 'AnaglyphPassNode';
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
constructor( scene, camera ) {
|
|
12
18
|
|
|
13
19
|
super( scene, camera );
|
|
@@ -29,6 +29,12 @@ const _BlurDirectionY = /*@__PURE__*/ new Vector2( 0.0, 1.0 );
|
|
|
29
29
|
|
|
30
30
|
class BloomNode extends TempNode {
|
|
31
31
|
|
|
32
|
+
static get type() {
|
|
33
|
+
|
|
34
|
+
return 'BloomNode';
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
constructor( inputNode, strength = 1, radius = 0, threshold = 0 ) {
|
|
33
39
|
|
|
34
40
|
super();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mix } from '../math/MathNode.js';
|
|
2
2
|
import { Fn } from '../tsl/TSLBase.js';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const sRGBToLinearSRGB = /*@__PURE__*/ Fn( ( [ color ] ) => {
|
|
5
5
|
|
|
6
6
|
const a = color.mul( 0.9478672986 ).add( 0.0521327014 ).pow( 2.4 );
|
|
7
7
|
const b = color.mul( 0.0773993808 );
|
|
@@ -12,14 +12,14 @@ export const sRGBToLinear = /*@__PURE__*/ Fn( ( [ color ] ) => {
|
|
|
12
12
|
return rgbResult;
|
|
13
13
|
|
|
14
14
|
} ).setLayout( {
|
|
15
|
-
name: '
|
|
15
|
+
name: 'sRGBToLinearSRGB',
|
|
16
16
|
type: 'vec3',
|
|
17
17
|
inputs: [
|
|
18
18
|
{ name: 'color', type: 'vec3' }
|
|
19
19
|
]
|
|
20
20
|
} );
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const linearSRGBTosRGB = /*@__PURE__*/ Fn( ( [ color ] ) => {
|
|
23
23
|
|
|
24
24
|
const a = color.pow( 0.41666 ).mul( 1.055 ).sub( 0.055 );
|
|
25
25
|
const b = color.mul( 12.92 );
|
|
@@ -30,7 +30,7 @@ export const LinearTosRGB = /*@__PURE__*/ Fn( ( [ color ] ) => {
|
|
|
30
30
|
return rgbResult;
|
|
31
31
|
|
|
32
32
|
} ).setLayout( {
|
|
33
|
-
name: '
|
|
33
|
+
name: 'linearSRGBTosRGB',
|
|
34
34
|
type: 'vec3',
|
|
35
35
|
inputs: [
|
|
36
36
|
{ name: 'color', type: 'vec3' }
|