super-three 0.167.0 → 0.168.0
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 +165 -44
- package/build/three.module.js +165 -45
- package/build/three.module.min.js +1 -1
- package/build/three.webgpu.js +23600 -21931
- package/build/three.webgpu.min.js +1 -1
- package/examples/jsm/Addons.js +3 -1
- package/examples/jsm/animation/AnimationClipCreator.js +1 -1
- package/examples/jsm/capabilities/WebGL.js +27 -21
- package/examples/jsm/controls/ArcballControls.js +174 -158
- package/examples/jsm/controls/DragControls.js +260 -132
- package/examples/jsm/controls/FirstPersonControls.js +175 -163
- package/examples/jsm/controls/FlyControls.js +194 -188
- package/examples/jsm/controls/OrbitControls.js +777 -786
- package/examples/jsm/controls/PointerLockControls.js +24 -15
- package/examples/jsm/controls/TrackballControls.js +453 -452
- package/examples/jsm/effects/AnaglyphEffect.js +6 -13
- package/examples/jsm/effects/ParallaxBarrierEffect.js +17 -11
- package/examples/jsm/effects/StereoEffect.js +6 -1
- package/examples/jsm/environments/RoomEnvironment.js +1 -1
- package/examples/jsm/exporters/GLTFExporter.js +6 -1
- package/examples/jsm/exporters/USDZExporter.js +29 -8
- package/examples/jsm/helpers/LightProbeHelper.js +42 -43
- package/examples/jsm/loaders/KTX2Loader.js +19 -7
- package/examples/jsm/loaders/MaterialXLoader.js +11 -4
- package/examples/jsm/loaders/PCDLoader.js +9 -9
- package/examples/jsm/objects/SkyMesh.js +188 -0
- package/examples/jsm/objects/Water2Mesh.js +159 -0
- package/examples/jsm/objects/WaterMesh.js +102 -0
- package/examples/jsm/physics/RapierPhysics.js +20 -0
- package/examples/jsm/postprocessing/OutlinePass.js +31 -46
- package/examples/jsm/postprocessing/SSAARenderPass.js +3 -1
- package/examples/jsm/shaders/BleachBypassShader.js +1 -2
- package/examples/jsm/shaders/OutputShader.js +1 -1
- package/examples/jsm/transpiler/TSLEncoder.js +8 -8
- package/examples/jsm/utils/TextureUtils.js +1 -1
- package/package.json +2 -1
- package/src/Three.WebGPU.js +6 -0
- package/src/Three.js +1 -0
- package/src/constants.js +1 -1
- package/src/extras/Controls.js +32 -0
- package/src/loaders/ObjectLoader.js +3 -3
- package/src/{nodes/loaders → loaders/nodes}/NodeLoader.js +4 -4
- package/src/{nodes/loaders → loaders/nodes}/NodeMaterialLoader.js +1 -2
- package/src/materials/Material.js +4 -7
- package/src/{nodes/materials → materials/nodes}/InstancedPointsNodeMaterial.js +33 -24
- package/src/{nodes/materials → materials/nodes}/Line2NodeMaterial.js +34 -37
- package/src/{nodes/materials → materials/nodes}/LineBasicNodeMaterial.js +3 -4
- package/src/{nodes/materials → materials/nodes}/LineDashedNodeMaterial.js +7 -9
- package/src/{nodes/materials → materials/nodes}/MeshBasicNodeMaterial.js +11 -11
- package/src/{nodes/materials → materials/nodes}/MeshLambertNodeMaterial.js +5 -5
- package/src/{nodes/materials → materials/nodes}/MeshMatcapNodeMaterial.js +8 -8
- package/src/materials/nodes/MeshNormalNodeMaterial.js +40 -0
- package/src/{nodes/materials → materials/nodes}/MeshPhongNodeMaterial.js +9 -8
- package/src/{nodes/materials → materials/nodes}/MeshPhysicalNodeMaterial.js +18 -17
- package/src/{nodes/materials → materials/nodes}/MeshSSSNodeMaterial.js +6 -6
- package/src/{nodes/materials → materials/nodes}/MeshStandardNodeMaterial.js +17 -11
- package/src/{nodes/materials → materials/nodes}/MeshToonNodeMaterial.js +4 -4
- package/src/{nodes/materials → materials/nodes}/NodeMaterial.js +67 -86
- package/src/{nodes/materials/Materials.js → materials/nodes/NodeMaterials.js} +1 -1
- package/src/{nodes/materials → materials/nodes}/PointsNodeMaterial.js +3 -4
- package/src/{nodes/materials → materials/nodes}/ShadowNodeMaterial.js +4 -4
- package/src/{nodes/materials → materials/nodes}/SpriteNodeMaterial.js +11 -11
- package/src/{nodes/materials → materials/nodes}/VolumeNodeMaterial.js +14 -16
- package/src/nodes/Nodes.js +103 -159
- package/src/nodes/TSL.js +176 -0
- package/src/nodes/accessors/AccessorsUtils.js +8 -8
- package/src/nodes/accessors/BatchNode.js +48 -20
- package/src/nodes/accessors/{BitangentNode.js → Bitangent.js} +9 -9
- package/src/nodes/accessors/BufferAttributeNode.js +5 -5
- package/src/nodes/accessors/BufferNode.js +4 -4
- package/src/nodes/accessors/{CameraNode.js → Camera.js} +10 -10
- package/src/nodes/accessors/ClippingNode.js +16 -14
- package/src/nodes/accessors/CubeTextureNode.js +5 -7
- package/src/nodes/accessors/InstanceNode.js +17 -13
- package/src/nodes/accessors/InstancedPointsMaterialNode.js +4 -4
- package/src/nodes/accessors/MaterialNode.js +52 -55
- package/src/nodes/accessors/MaterialProperties.js +3 -0
- package/src/nodes/accessors/MaterialReferenceNode.js +6 -4
- package/src/nodes/accessors/ModelNode.js +11 -11
- package/src/nodes/accessors/ModelViewProjectionNode.js +6 -7
- package/src/nodes/accessors/MorphNode.js +12 -12
- package/src/nodes/accessors/Normal.js +62 -0
- package/src/nodes/accessors/Object3DNode.js +10 -10
- package/src/nodes/accessors/PointUVNode.js +4 -4
- package/src/nodes/accessors/Position.js +10 -0
- package/src/nodes/accessors/ReferenceBaseNode.js +143 -0
- package/src/nodes/accessors/ReferenceNode.js +13 -7
- package/src/nodes/accessors/ReflectVector.js +10 -0
- package/src/nodes/accessors/RendererReferenceNode.js +6 -6
- package/src/nodes/accessors/SceneNode.js +5 -6
- package/src/nodes/accessors/SkinningNode.js +84 -21
- package/src/nodes/accessors/StorageBufferNode.js +4 -5
- package/src/nodes/accessors/StorageTextureNode.js +5 -5
- package/src/nodes/accessors/Tangent.js +22 -0
- package/src/nodes/accessors/Texture3DNode.js +11 -11
- package/src/nodes/accessors/{TextureBicubicNode.js → TextureBicubic.js} +3 -32
- package/src/nodes/accessors/TextureNode.js +16 -21
- package/src/nodes/accessors/TextureSizeNode.js +4 -6
- package/src/nodes/accessors/{UniformsNode.js → UniformArrayNode.js} +17 -8
- package/src/nodes/accessors/UserDataNode.js +4 -4
- package/src/nodes/accessors/VelocityNode.js +83 -0
- package/src/nodes/accessors/VertexColorNode.js +4 -4
- package/src/nodes/code/CodeNode.js +5 -5
- package/src/nodes/code/ExpressionNode.js +4 -4
- package/src/nodes/code/FunctionCallNode.js +5 -5
- package/src/nodes/code/FunctionNode.js +5 -23
- package/src/nodes/code/ScriptableNode.js +4 -6
- package/src/nodes/code/ScriptableValueNode.js +4 -6
- package/src/nodes/core/AssignNode.js +5 -5
- package/src/nodes/core/AttributeNode.js +7 -20
- package/src/nodes/core/BypassNode.js +5 -5
- package/src/nodes/core/CacheNode.js +5 -5
- package/src/nodes/core/ConstNode.js +2 -2
- package/src/nodes/core/ContextNode.js +17 -11
- package/src/nodes/core/IndexNode.js +12 -7
- package/src/nodes/core/InputNode.js +2 -2
- package/src/nodes/core/MRTNode.js +12 -6
- package/src/nodes/core/Node.js +39 -19
- package/src/nodes/core/NodeBuilder.js +46 -33
- package/src/nodes/core/NodeUtils.js +1 -0
- package/src/nodes/core/OutputStructNode.js +4 -4
- package/src/nodes/core/ParameterNode.js +4 -4
- package/src/nodes/core/PropertyNode.js +32 -32
- package/src/nodes/core/StackNode.js +26 -10
- package/src/nodes/core/StructTypeNode.js +2 -2
- package/src/nodes/core/TempNode.js +2 -2
- package/src/nodes/core/UniformGroupNode.js +8 -9
- package/src/nodes/core/UniformNode.js +4 -4
- package/src/nodes/core/VarNode.js +6 -6
- package/src/nodes/core/VaryingNode.js +5 -5
- package/src/nodes/display/AfterImageNode.js +9 -9
- package/src/nodes/display/AnaglyphPassNode.js +61 -0
- package/src/nodes/display/AnamorphicNode.js +11 -11
- package/src/nodes/display/BleachBypass.js +26 -0
- package/src/nodes/display/BlendMode.js +54 -0
- package/src/nodes/display/BloomNode.js +21 -19
- package/src/nodes/display/BumpMapNode.js +7 -12
- package/src/nodes/display/ColorAdjustment.js +46 -0
- package/src/nodes/display/ColorSpaceFunctions.js +38 -0
- package/src/nodes/display/ColorSpaceNode.js +40 -63
- package/src/nodes/display/DenoiseNode.js +20 -17
- package/src/nodes/display/DepthOfFieldNode.js +8 -6
- package/src/nodes/display/DotScreenNode.js +10 -22
- package/src/nodes/display/FXAANode.js +17 -15
- package/src/nodes/display/FilmNode.js +7 -6
- package/src/nodes/display/FrontFacingNode.js +5 -5
- package/src/nodes/display/GTAONode.js +19 -15
- package/src/nodes/display/GaussianBlurNode.js +11 -8
- package/src/nodes/display/Lut3DNode.js +6 -5
- package/src/nodes/display/MotionBlur.js +25 -0
- package/src/nodes/display/NormalMapNode.js +8 -10
- package/src/nodes/display/ParallaxBarrierPassNode.js +55 -0
- package/src/nodes/display/PassNode.js +84 -8
- package/src/nodes/display/PixelationPassNode.js +12 -7
- package/src/nodes/display/PosterizeNode.js +4 -6
- package/src/nodes/display/RGBShiftNode.js +8 -7
- package/src/nodes/display/RenderOutputNode.js +9 -9
- package/src/nodes/display/SSAAPassNode.js +284 -0
- package/src/nodes/display/Sepia.js +17 -0
- package/src/nodes/display/SobelOperatorNode.js +9 -7
- package/src/nodes/display/StereoCompositePassNode.js +107 -0
- package/src/nodes/display/StereoPassNode.js +80 -0
- package/src/nodes/display/ToneMappingFunctions.js +190 -0
- package/src/nodes/display/ToneMappingNode.js +12 -173
- package/src/nodes/display/TransitionNode.js +9 -8
- package/src/nodes/display/ViewportDepthNode.js +30 -29
- package/src/nodes/display/ViewportDepthTextureNode.js +6 -8
- package/src/nodes/display/ViewportNode.js +26 -25
- package/src/nodes/display/ViewportSharedTextureNode.js +6 -8
- package/src/nodes/display/ViewportTextureNode.js +7 -10
- package/src/nodes/fog/FogExp2Node.js +4 -6
- package/src/nodes/fog/FogNode.js +5 -7
- package/src/nodes/fog/FogRangeNode.js +4 -6
- package/src/nodes/functions/BSDF/BRDF_GGX.js +4 -4
- package/src/nodes/functions/BSDF/BRDF_Lambert.js +2 -2
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +6 -6
- package/src/nodes/functions/BSDF/DFGApprox.js +2 -2
- package/src/nodes/functions/BSDF/D_GGX.js +2 -2
- package/src/nodes/functions/BSDF/D_GGX_Anisotropic.js +3 -3
- package/src/nodes/functions/BSDF/EnvironmentBRDF.js +2 -2
- package/src/nodes/functions/BSDF/F_Schlick.js +2 -2
- package/src/nodes/functions/BSDF/LTC.js +6 -6
- package/src/nodes/functions/BSDF/Schlick_to_F0.js +2 -2
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.js +2 -2
- package/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.js +2 -2
- package/src/nodes/functions/BasicLightingModel.js +1 -1
- package/src/nodes/functions/PhongLightingModel.js +5 -5
- package/src/nodes/functions/PhysicalLightingModel.js +32 -31
- package/src/nodes/functions/ShadowMaskModel.js +1 -1
- package/src/nodes/functions/ToonLightingModel.js +3 -3
- package/src/nodes/functions/material/getGeometryRoughness.js +4 -4
- package/src/nodes/functions/material/getRoughness.js +2 -2
- package/src/nodes/geometry/RangeNode.js +4 -4
- package/src/nodes/gpgpu/ComputeNode.js +5 -5
- package/src/nodes/lighting/AONode.js +2 -2
- package/src/nodes/lighting/AmbientLightNode.js +2 -7
- package/src/nodes/lighting/AnalyticLightNode.js +34 -13
- package/src/nodes/lighting/BasicEnvironmentNode.js +4 -3
- package/src/nodes/lighting/BasicLightMapNode.js +3 -3
- package/src/nodes/lighting/DirectionalLightNode.js +2 -7
- package/src/nodes/lighting/EnvironmentNode.js +20 -19
- package/src/nodes/lighting/HemisphereLightNode.js +3 -7
- package/src/nodes/lighting/IESSpotLightNode.js +3 -8
- package/src/nodes/lighting/IrradianceNode.js +2 -2
- package/src/nodes/lighting/LightNode.js +5 -5
- package/src/nodes/lighting/LightProbeNode.js +76 -0
- package/src/nodes/lighting/LightUtils.js +3 -3
- package/src/nodes/lighting/LightingContextNode.js +15 -17
- package/src/nodes/lighting/LightingNode.js +2 -2
- package/src/nodes/lighting/LightsNode.js +94 -76
- package/src/nodes/lighting/PointLightNode.js +3 -8
- package/src/nodes/lighting/RectAreaLightNode.js +2 -6
- package/src/nodes/lighting/SpotLightNode.js +3 -8
- package/src/nodes/materialx/MaterialXNodes.js +2 -2
- package/src/nodes/materialx/lib/mx_hsv.js +36 -31
- package/src/nodes/materialx/lib/mx_noise.js +96 -96
- package/src/nodes/materialx/lib/mx_transform_color.js +2 -2
- package/src/nodes/math/{CondNode.js → ConditionalNode.js} +18 -7
- package/src/nodes/math/Hash.js +13 -0
- package/src/nodes/math/MathNode.js +124 -124
- package/src/nodes/math/MathUtils.js +0 -7
- package/src/nodes/math/OperatorNode.js +94 -52
- package/src/nodes/math/TriNoise3D.js +19 -29
- package/src/nodes/pmrem/PMREMNode.js +58 -15
- package/src/nodes/pmrem/PMREMUtils.js +46 -46
- package/src/nodes/procedural/Checker.js +14 -0
- package/src/nodes/tsl/TSLBase.js +30 -0
- package/src/nodes/{shadernode/ShaderNode.js → tsl/TSLCore.js} +105 -97
- package/src/nodes/utils/ArrayElementNode.js +2 -2
- package/src/nodes/utils/ConvertNode.js +2 -2
- package/src/nodes/utils/CubeMapNode.js +157 -0
- package/src/nodes/utils/Discard.js +8 -0
- package/src/nodes/utils/EquirectUVNode.js +5 -5
- package/src/nodes/utils/FlipNode.js +65 -0
- package/src/nodes/utils/FunctionOverloadingNode.js +5 -5
- package/src/nodes/utils/JoinNode.js +2 -2
- package/src/nodes/utils/LoopNode.js +12 -6
- package/src/nodes/utils/MatcapUVNode.js +6 -6
- package/src/nodes/utils/MaxMipLevelNode.js +4 -4
- package/src/nodes/utils/OscNode.js +7 -7
- package/src/nodes/utils/Packing.js +4 -0
- package/src/nodes/utils/RTTNode.js +8 -8
- package/src/nodes/utils/ReflectorNode.js +8 -3
- package/src/nodes/utils/RemapNode.js +7 -7
- package/src/nodes/utils/RotateNode.js +4 -12
- package/src/nodes/utils/SetNode.js +2 -2
- package/src/nodes/utils/SplitNode.js +2 -2
- package/src/nodes/utils/SpriteSheetUVNode.js +5 -5
- package/src/nodes/utils/SpriteUtils.js +47 -0
- package/src/nodes/utils/StorageArrayElementNode.js +4 -6
- package/src/nodes/utils/TimerNode.js +5 -5
- package/src/nodes/utils/TriplanarTexturesNode.js +7 -9
- package/src/nodes/utils/UVUtils.js +19 -0
- package/src/nodes/utils/ViewportUtils.js +14 -0
- package/src/objects/BatchedMesh.js +2 -3
- package/src/renderers/WebGLRenderer.js +24 -0
- package/src/renderers/common/Backend.js +2 -2
- package/src/renderers/common/Background.js +3 -1
- package/src/renderers/common/BindGroup.js +3 -1
- package/src/renderers/common/Bindings.js +13 -15
- package/src/renderers/common/ClippingContext.js +14 -5
- package/src/renderers/common/CubeRenderTarget.js +9 -3
- package/src/renderers/common/PostProcessing.js +4 -1
- package/src/renderers/common/QuadMesh.js +2 -0
- package/src/renderers/common/RenderContext.js +24 -0
- package/src/renderers/common/RenderList.js +1 -1
- package/src/renderers/common/RenderObject.js +2 -2
- package/src/renderers/common/Renderer.js +75 -49
- package/src/renderers/common/SampledTexture.js +12 -3
- package/src/renderers/common/StandardRenderer.js +18 -0
- package/src/renderers/common/Textures.js +8 -12
- package/src/renderers/common/extras/PMREMGenerator.js +12 -13
- package/src/renderers/common/nodes/NodeBuilderState.js +1 -1
- package/src/renderers/common/nodes/NodeLibrary.js +118 -0
- package/src/renderers/common/nodes/NodeSampledTexture.js +2 -2
- package/src/renderers/common/nodes/Nodes.js +36 -9
- package/src/renderers/common/nodes/StandardNodeLibrary.js +105 -0
- package/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.js +2 -2
- package/src/renderers/webgl/WebGLProgram.js +1 -1
- package/src/renderers/webgl/WebGLProperties.js +7 -0
- package/src/renderers/webgl/WebGLTextures.js +61 -4
- package/src/renderers/webgl-fallback/WebGLBackend.js +88 -68
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +57 -9
- package/src/renderers/webgl-fallback/utils/WebGLState.js +21 -0
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +28 -21
- package/src/renderers/webgpu/WebGPUBackend.js +86 -68
- package/src/renderers/webgpu/WebGPURenderer.js +8 -8
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +99 -63
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +45 -21
- package/src/renderers/webgpu/utils/WebGPUConstants.js +2 -1
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +6 -15
- package/src/renderers/webgpu/utils/WebGPUTexturePassUtils.js +62 -5
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +36 -21
- package/src/renderers/webgpu/utils/WebGPUUtils.js +18 -1
- package/src/renderers/webxr/WebXRManager.js +32 -25
- package/examples/jsm/loaders/LogLuvLoader.js +0 -606
- package/src/nodes/accessors/NormalNode.js +0 -14
- package/src/nodes/accessors/PositionNode.js +0 -10
- package/src/nodes/accessors/ReflectVectorNode.js +0 -10
- package/src/nodes/accessors/TangentNode.js +0 -23
- package/src/nodes/core/NodeKeywords.js +0 -80
- package/src/nodes/display/BlendModeNode.js +0 -128
- package/src/nodes/display/ColorAdjustmentNode.js +0 -104
- package/src/nodes/materials/MeshNormalNodeMaterial.js +0 -40
- package/src/nodes/math/HashNode.js +0 -34
- package/src/nodes/procedural/CheckerNode.js +0 -42
- package/src/nodes/utils/DiscardNode.js +0 -28
- package/src/nodes/utils/PackingNode.js +0 -55
- package/src/nodes/utils/RotateUVNode.js +0 -35
- /package/src/{nodes/loaders → loaders/nodes}/NodeObjectLoader.js +0 -0
- /package/src/nodes/accessors/{UVNode.js → UV.js} +0 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { registerNode } from '../core/Node.js';
|
|
2
|
+
import { nodeObject } from '../tsl/TSLBase.js';
|
|
3
|
+
import PassNode from './PassNode.js';
|
|
4
|
+
import { Color } from '../../math/Color.js';
|
|
5
|
+
import { Vector2 } from '../../math/Vector2.js';
|
|
6
|
+
import { AdditiveBlending } from '../../constants.js';
|
|
7
|
+
import { uniform } from '../core/UniformNode.js';
|
|
8
|
+
import QuadMesh from '../../renderers/common/QuadMesh.js';
|
|
9
|
+
import { texture } from '../accessors/TextureNode.js';
|
|
10
|
+
import { mrt, getTextureIndex } from '../core/MRTNode.js';
|
|
11
|
+
import NodeMaterial from '../../materials/nodes/NodeMaterial.js';
|
|
12
|
+
|
|
13
|
+
const _size = /*@__PURE__*/ new Vector2();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* Supersample Anti-Aliasing Render Pass
|
|
18
|
+
*
|
|
19
|
+
* This manual approach to SSAA re-renders the scene ones for each sample with camera jitter and accumulates the results.
|
|
20
|
+
*
|
|
21
|
+
* References: https://en.wikipedia.org/wiki/Supersampling
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
class SSAAPassNode extends PassNode {
|
|
26
|
+
|
|
27
|
+
constructor( scene, camera ) {
|
|
28
|
+
|
|
29
|
+
super( PassNode.COLOR, scene, camera );
|
|
30
|
+
|
|
31
|
+
this.isSSAAPassNode = true;
|
|
32
|
+
|
|
33
|
+
this.sampleLevel = 4; // specified as n, where the number of samples is 2^n, so sampleLevel = 4, is 2^4 samples, 16.
|
|
34
|
+
this.unbiased = true;
|
|
35
|
+
this.clearColor = new Color( 0x000000 );
|
|
36
|
+
this.clearAlpha = 0;
|
|
37
|
+
|
|
38
|
+
this._currentClearColor = new Color();
|
|
39
|
+
|
|
40
|
+
this.sampleWeight = uniform( 1 );
|
|
41
|
+
|
|
42
|
+
this.sampleRenderTarget = null;
|
|
43
|
+
|
|
44
|
+
this._quadMesh = new QuadMesh();
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
updateBefore( frame ) {
|
|
49
|
+
|
|
50
|
+
const { renderer } = frame;
|
|
51
|
+
const { scene, camera } = this;
|
|
52
|
+
|
|
53
|
+
this._pixelRatio = renderer.getPixelRatio();
|
|
54
|
+
|
|
55
|
+
const size = renderer.getSize( _size );
|
|
56
|
+
|
|
57
|
+
this.setSize( size.width, size.height );
|
|
58
|
+
this.sampleRenderTarget.setSize( this.renderTarget.width, this.renderTarget.height );
|
|
59
|
+
|
|
60
|
+
// save current renderer settings
|
|
61
|
+
|
|
62
|
+
renderer.getClearColor( this._currentClearColor );
|
|
63
|
+
const currentClearAlpha = renderer.getClearAlpha();
|
|
64
|
+
const currentRenderTarget = renderer.getRenderTarget();
|
|
65
|
+
const currentMRT = renderer.getMRT();
|
|
66
|
+
const currentAutoClear = renderer.autoClear;
|
|
67
|
+
|
|
68
|
+
//
|
|
69
|
+
|
|
70
|
+
this._cameraNear.value = camera.near;
|
|
71
|
+
this._cameraFar.value = camera.far;
|
|
72
|
+
|
|
73
|
+
renderer.setMRT( this.getMRT() );
|
|
74
|
+
renderer.autoClear = false;
|
|
75
|
+
|
|
76
|
+
const jitterOffsets = _JitterVectors[ Math.max( 0, Math.min( this.sampleLevel, 5 ) ) ];
|
|
77
|
+
|
|
78
|
+
const baseSampleWeight = 1.0 / jitterOffsets.length;
|
|
79
|
+
const roundingRange = 1 / 32;
|
|
80
|
+
|
|
81
|
+
const viewOffset = {
|
|
82
|
+
|
|
83
|
+
fullWidth: this.renderTarget.width,
|
|
84
|
+
fullHeight: this.renderTarget.height,
|
|
85
|
+
offsetX: 0,
|
|
86
|
+
offsetY: 0,
|
|
87
|
+
width: this.renderTarget.width,
|
|
88
|
+
height: this.renderTarget.height
|
|
89
|
+
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const originalViewOffset = Object.assign( {}, camera.view );
|
|
93
|
+
|
|
94
|
+
if ( originalViewOffset.enabled ) Object.assign( viewOffset, originalViewOffset );
|
|
95
|
+
|
|
96
|
+
// render the scene multiple times, each slightly jitter offset from the last and accumulate the results.
|
|
97
|
+
|
|
98
|
+
for ( let i = 0; i < jitterOffsets.length; i ++ ) {
|
|
99
|
+
|
|
100
|
+
const jitterOffset = jitterOffsets[ i ];
|
|
101
|
+
|
|
102
|
+
if ( camera.setViewOffset ) {
|
|
103
|
+
|
|
104
|
+
camera.setViewOffset(
|
|
105
|
+
|
|
106
|
+
viewOffset.fullWidth, viewOffset.fullHeight,
|
|
107
|
+
|
|
108
|
+
viewOffset.offsetX + jitterOffset[ 0 ] * 0.0625, viewOffset.offsetY + jitterOffset[ 1 ] * 0.0625, // 0.0625 = 1 / 16
|
|
109
|
+
|
|
110
|
+
viewOffset.width, viewOffset.height
|
|
111
|
+
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
this.sampleWeight.value = baseSampleWeight;
|
|
117
|
+
|
|
118
|
+
if ( this.unbiased ) {
|
|
119
|
+
|
|
120
|
+
// the theory is that equal weights for each sample lead to an accumulation of rounding errors.
|
|
121
|
+
// The following equation varies the sampleWeight per sample so that it is uniformly distributed
|
|
122
|
+
// across a range of values whose rounding errors cancel each other out.
|
|
123
|
+
|
|
124
|
+
const uniformCenteredDistribution = ( - 0.5 + ( i + 0.5 ) / jitterOffsets.length );
|
|
125
|
+
this.sampleWeight.value += roundingRange * uniformCenteredDistribution;
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
renderer.setClearColor( this.clearColor, this.clearAlpha );
|
|
130
|
+
renderer.setRenderTarget( this.sampleRenderTarget );
|
|
131
|
+
renderer.clear();
|
|
132
|
+
renderer.render( scene, camera );
|
|
133
|
+
|
|
134
|
+
// accumulation
|
|
135
|
+
|
|
136
|
+
renderer.setRenderTarget( this.renderTarget );
|
|
137
|
+
|
|
138
|
+
if ( i === 0 ) {
|
|
139
|
+
|
|
140
|
+
renderer.setClearColor( 0x000000, 0.0 );
|
|
141
|
+
renderer.clear();
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
this._quadMesh.render( renderer );
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
renderer.copyTextureToTexture( this.sampleRenderTarget.depthTexture, this.renderTarget.depthTexture );
|
|
150
|
+
|
|
151
|
+
// restore
|
|
152
|
+
|
|
153
|
+
if ( camera.setViewOffset && originalViewOffset.enabled ) {
|
|
154
|
+
|
|
155
|
+
camera.setViewOffset(
|
|
156
|
+
|
|
157
|
+
originalViewOffset.fullWidth, originalViewOffset.fullHeight,
|
|
158
|
+
|
|
159
|
+
originalViewOffset.offsetX, originalViewOffset.offsetY,
|
|
160
|
+
|
|
161
|
+
originalViewOffset.width, originalViewOffset.height
|
|
162
|
+
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
} else if ( camera.clearViewOffset ) {
|
|
166
|
+
|
|
167
|
+
camera.clearViewOffset();
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
renderer.setRenderTarget( currentRenderTarget );
|
|
172
|
+
renderer.setMRT( currentMRT );
|
|
173
|
+
|
|
174
|
+
renderer.autoClear = currentAutoClear;
|
|
175
|
+
renderer.setClearColor( this._currentClearColor, currentClearAlpha );
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
setup( builder ) {
|
|
180
|
+
|
|
181
|
+
if ( this.sampleRenderTarget === null ) {
|
|
182
|
+
|
|
183
|
+
this.sampleRenderTarget = this.renderTarget.clone();
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
let sampleTexture;
|
|
188
|
+
|
|
189
|
+
const passMRT = this.getMRT();
|
|
190
|
+
|
|
191
|
+
if ( passMRT !== null ) {
|
|
192
|
+
|
|
193
|
+
const outputs = {};
|
|
194
|
+
|
|
195
|
+
for ( const name in passMRT.outputNodes ) {
|
|
196
|
+
|
|
197
|
+
const index = getTextureIndex( this.sampleRenderTarget.textures, name );
|
|
198
|
+
|
|
199
|
+
if ( index >= 0 ) {
|
|
200
|
+
|
|
201
|
+
outputs[ name ] = texture( this.sampleRenderTarget.textures[ index ] ).mul( this.sampleWeight );
|
|
202
|
+
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
sampleTexture = mrt( outputs );
|
|
208
|
+
|
|
209
|
+
} else {
|
|
210
|
+
|
|
211
|
+
sampleTexture = texture( this.sampleRenderTarget.texture ).mul( this.sampleWeight );
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
this._quadMesh.material = new NodeMaterial();
|
|
216
|
+
this._quadMesh.material.fragmentNode = sampleTexture;
|
|
217
|
+
this._quadMesh.material.transparent = true;
|
|
218
|
+
this._quadMesh.material.depthTest = false;
|
|
219
|
+
this._quadMesh.material.depthWrite = false;
|
|
220
|
+
this._quadMesh.material.premultipliedAlpha = true;
|
|
221
|
+
this._quadMesh.material.blending = AdditiveBlending;
|
|
222
|
+
this._quadMesh.material.normals = false;
|
|
223
|
+
this._quadMesh.material.name = 'SSAA';
|
|
224
|
+
|
|
225
|
+
return super.setup( builder );
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
dispose() {
|
|
230
|
+
|
|
231
|
+
super.dispose();
|
|
232
|
+
|
|
233
|
+
if ( this.sampleRenderTarget !== null ) {
|
|
234
|
+
|
|
235
|
+
this.sampleRenderTarget.dispose();
|
|
236
|
+
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export default SSAAPassNode;
|
|
244
|
+
|
|
245
|
+
SSAAPassNode.type = /*@__PURE__*/ registerNode( 'SSAAPass', SSAAPassNode );
|
|
246
|
+
|
|
247
|
+
// These jitter vectors are specified in integers because it is easier.
|
|
248
|
+
// I am assuming a [-8,8) integer grid, but it needs to be mapped onto [-0.5,0.5)
|
|
249
|
+
// before being used, thus these integers need to be scaled by 1/16.
|
|
250
|
+
//
|
|
251
|
+
// Sample patterns reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476218%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
|
|
252
|
+
const _JitterVectors = [
|
|
253
|
+
[
|
|
254
|
+
[ 0, 0 ]
|
|
255
|
+
],
|
|
256
|
+
[
|
|
257
|
+
[ 4, 4 ], [ - 4, - 4 ]
|
|
258
|
+
],
|
|
259
|
+
[
|
|
260
|
+
[ - 2, - 6 ], [ 6, - 2 ], [ - 6, 2 ], [ 2, 6 ]
|
|
261
|
+
],
|
|
262
|
+
[
|
|
263
|
+
[ 1, - 3 ], [ - 1, 3 ], [ 5, 1 ], [ - 3, - 5 ],
|
|
264
|
+
[ - 5, 5 ], [ - 7, - 1 ], [ 3, 7 ], [ 7, - 7 ]
|
|
265
|
+
],
|
|
266
|
+
[
|
|
267
|
+
[ 1, 1 ], [ - 1, - 3 ], [ - 3, 2 ], [ 4, - 1 ],
|
|
268
|
+
[ - 5, - 2 ], [ 2, 5 ], [ 5, 3 ], [ 3, - 5 ],
|
|
269
|
+
[ - 2, 6 ], [ 0, - 7 ], [ - 4, - 6 ], [ - 6, 4 ],
|
|
270
|
+
[ - 8, 0 ], [ 7, - 4 ], [ 6, 7 ], [ - 7, - 8 ]
|
|
271
|
+
],
|
|
272
|
+
[
|
|
273
|
+
[ - 4, - 7 ], [ - 7, - 5 ], [ - 3, - 5 ], [ - 5, - 4 ],
|
|
274
|
+
[ - 1, - 4 ], [ - 2, - 2 ], [ - 6, - 1 ], [ - 4, 0 ],
|
|
275
|
+
[ - 7, 1 ], [ - 1, 2 ], [ - 6, 3 ], [ - 3, 3 ],
|
|
276
|
+
[ - 7, 6 ], [ - 3, 6 ], [ - 5, 7 ], [ - 1, 7 ],
|
|
277
|
+
[ 5, - 7 ], [ 1, - 6 ], [ 6, - 5 ], [ 4, - 4 ],
|
|
278
|
+
[ 2, - 3 ], [ 7, - 2 ], [ 1, - 1 ], [ 4, - 1 ],
|
|
279
|
+
[ 2, 1 ], [ 6, 2 ], [ 0, 4 ], [ 4, 4 ],
|
|
280
|
+
[ 2, 5 ], [ 7, 5 ], [ 5, 6 ], [ 3, 7 ]
|
|
281
|
+
]
|
|
282
|
+
];
|
|
283
|
+
|
|
284
|
+
export const ssaaPass = ( scene, camera ) => nodeObject( new SSAAPassNode( scene, camera ) );
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Fn, vec3, vec4 } from '../tsl/TSLBase.js';
|
|
2
|
+
import { dot } from '../math/MathNode.js';
|
|
3
|
+
|
|
4
|
+
export const sepia = /*@__PURE__*/ Fn( ( [ color ] ) => {
|
|
5
|
+
|
|
6
|
+
const c = vec3( color );
|
|
7
|
+
|
|
8
|
+
// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/sepia.js
|
|
9
|
+
|
|
10
|
+
return vec4(
|
|
11
|
+
dot( c, vec3( 0.393, 0.769, 0.189 ) ),
|
|
12
|
+
dot( c, vec3( 0.349, 0.686, 0.168 ) ),
|
|
13
|
+
dot( c, vec3( 0.272, 0.534, 0.131 ) ),
|
|
14
|
+
color.a
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
} );
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { registerNode } from '../core/Node.js';
|
|
1
2
|
import TempNode from '../core/TempNode.js';
|
|
2
|
-
import { uv } from '../accessors/
|
|
3
|
-
import { luminance } from './
|
|
4
|
-
import {
|
|
3
|
+
import { uv } from '../accessors/UV.js';
|
|
4
|
+
import { luminance } from './ColorAdjustment.js';
|
|
5
|
+
import { Fn, nodeObject, vec2, vec3, vec4, mat3 } from '../tsl/TSLBase.js';
|
|
5
6
|
import { NodeUpdateType } from '../core/constants.js';
|
|
6
7
|
import { uniform } from '../core/UniformNode.js';
|
|
7
8
|
import { add } from '../math/OperatorNode.js';
|
|
9
|
+
import { convertToTexture } from '../utils/RTTNode.js';
|
|
8
10
|
|
|
9
11
|
import { Vector2 } from '../../math/Vector2.js';
|
|
10
12
|
|
|
@@ -38,7 +40,7 @@ class SobelOperatorNode extends TempNode {
|
|
|
38
40
|
|
|
39
41
|
const sampleTexture = ( uv ) => textureNode.uv( uv );
|
|
40
42
|
|
|
41
|
-
const sobel =
|
|
43
|
+
const sobel = Fn( () => {
|
|
42
44
|
|
|
43
45
|
// Sobel Edge Detection (see https://youtu.be/uihBwtPIBxM)
|
|
44
46
|
|
|
@@ -114,8 +116,8 @@ class SobelOperatorNode extends TempNode {
|
|
|
114
116
|
|
|
115
117
|
}
|
|
116
118
|
|
|
117
|
-
export
|
|
119
|
+
export default SobelOperatorNode;
|
|
118
120
|
|
|
119
|
-
|
|
121
|
+
SobelOperatorNode.type = /*@__PURE__*/ registerNode( 'SobelOperator', SobelOperatorNode );
|
|
120
122
|
|
|
121
|
-
export
|
|
123
|
+
export const sobel = ( node ) => nodeObject( new SobelOperatorNode( convertToTexture( node ) ) );
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
|
|
2
|
+
import { registerNode } from '../core/Node.js';
|
|
3
|
+
import PassNode from './PassNode.js';
|
|
4
|
+
import { StereoCamera } from '../../cameras/StereoCamera.js';
|
|
5
|
+
import { HalfFloatType, LinearFilter, NearestFilter } from '../../constants.js';
|
|
6
|
+
import { RenderTarget } from '../../core/RenderTarget.js';
|
|
7
|
+
import { texture } from '../accessors/TextureNode.js';
|
|
8
|
+
import { Vector2 } from '../../math/Vector2.js';
|
|
9
|
+
import QuadMesh from '../../renderers/common/QuadMesh.js';
|
|
10
|
+
|
|
11
|
+
const _size = /*@__PURE__*/ new Vector2();
|
|
12
|
+
const _quadMesh = /*@__PURE__*/ new QuadMesh();
|
|
13
|
+
|
|
14
|
+
class StereoCompositePassNode extends PassNode {
|
|
15
|
+
|
|
16
|
+
constructor( scene, camera ) {
|
|
17
|
+
|
|
18
|
+
super( PassNode.COLOR, scene, camera );
|
|
19
|
+
|
|
20
|
+
this.isStereoCompositePassNode = true;
|
|
21
|
+
|
|
22
|
+
this.stereo = new StereoCamera();
|
|
23
|
+
const _params = { minFilter: LinearFilter, magFilter: NearestFilter, type: HalfFloatType };
|
|
24
|
+
|
|
25
|
+
this._renderTargetL = new RenderTarget( 1, 1, _params );
|
|
26
|
+
this._renderTargetR = new RenderTarget( 1, 1, _params );
|
|
27
|
+
|
|
28
|
+
this._mapLeft = texture( this._renderTargetL.texture );
|
|
29
|
+
this._mapRight = texture( this._renderTargetR.texture );
|
|
30
|
+
|
|
31
|
+
this._material = null;
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
updateStereoCamera( coordinateSystem ) {
|
|
36
|
+
|
|
37
|
+
this.stereo.cameraL.coordinateSystem = coordinateSystem;
|
|
38
|
+
this.stereo.cameraR.coordinateSystem = coordinateSystem;
|
|
39
|
+
this.stereo.update( this.camera );
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
setSize( width, height ) {
|
|
44
|
+
|
|
45
|
+
super.setSize( width, height );
|
|
46
|
+
|
|
47
|
+
this._renderTargetL.setSize( this.renderTarget.width, this.renderTarget.height );
|
|
48
|
+
this._renderTargetR.setSize( this.renderTarget.width, this.renderTarget.height );
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
updateBefore( frame ) {
|
|
53
|
+
|
|
54
|
+
const { renderer } = frame;
|
|
55
|
+
const { scene, stereo, renderTarget } = this;
|
|
56
|
+
|
|
57
|
+
this._pixelRatio = renderer.getPixelRatio();
|
|
58
|
+
|
|
59
|
+
this.updateStereoCamera( renderer.coordinateSystem );
|
|
60
|
+
|
|
61
|
+
const size = renderer.getSize( _size );
|
|
62
|
+
this.setSize( size.width, size.height );
|
|
63
|
+
|
|
64
|
+
const currentRenderTarget = renderer.getRenderTarget();
|
|
65
|
+
|
|
66
|
+
// left
|
|
67
|
+
|
|
68
|
+
renderer.setRenderTarget( this._renderTargetL );
|
|
69
|
+
renderer.render( scene, stereo.cameraL );
|
|
70
|
+
|
|
71
|
+
// right
|
|
72
|
+
|
|
73
|
+
renderer.setRenderTarget( this._renderTargetR );
|
|
74
|
+
renderer.render( scene, stereo.cameraR );
|
|
75
|
+
|
|
76
|
+
// composite
|
|
77
|
+
|
|
78
|
+
renderer.setRenderTarget( renderTarget );
|
|
79
|
+
_quadMesh.material = this._material;
|
|
80
|
+
_quadMesh.render( renderer );
|
|
81
|
+
|
|
82
|
+
// restore
|
|
83
|
+
|
|
84
|
+
renderer.setRenderTarget( currentRenderTarget );
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
dispose() {
|
|
89
|
+
|
|
90
|
+
super.dispose();
|
|
91
|
+
|
|
92
|
+
this._renderTargetL.dispose();
|
|
93
|
+
this._renderTargetR.dispose();
|
|
94
|
+
|
|
95
|
+
if ( this._material !== null ) {
|
|
96
|
+
|
|
97
|
+
this._material.dispose();
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export default StereoCompositePassNode;
|
|
106
|
+
|
|
107
|
+
StereoCompositePassNode.type = /*@__PURE__*/ registerNode( 'StereoCompositePass', StereoCompositePassNode );
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { registerNode } from '../core/Node.js';
|
|
2
|
+
import { nodeObject } from '../tsl/TSLBase.js';
|
|
3
|
+
import PassNode from './PassNode.js';
|
|
4
|
+
import { Vector2 } from '../../math/Vector2.js';
|
|
5
|
+
import { StereoCamera } from '../../cameras/StereoCamera.js';
|
|
6
|
+
|
|
7
|
+
const _size = /*@__PURE__*/ new Vector2();
|
|
8
|
+
|
|
9
|
+
class StereoPassNode extends PassNode {
|
|
10
|
+
|
|
11
|
+
constructor( scene, camera ) {
|
|
12
|
+
|
|
13
|
+
super( PassNode.COLOR, scene, camera );
|
|
14
|
+
|
|
15
|
+
this.isStereoPassNode = true;
|
|
16
|
+
|
|
17
|
+
this.stereo = new StereoCamera();
|
|
18
|
+
this.stereo.aspect = 0.5;
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
updateBefore( frame ) {
|
|
23
|
+
|
|
24
|
+
const { renderer } = frame;
|
|
25
|
+
const { scene, camera, stereo, renderTarget } = this;
|
|
26
|
+
|
|
27
|
+
this._pixelRatio = renderer.getPixelRatio();
|
|
28
|
+
|
|
29
|
+
stereo.cameraL.coordinateSystem = renderer.coordinateSystem;
|
|
30
|
+
stereo.cameraR.coordinateSystem = renderer.coordinateSystem;
|
|
31
|
+
stereo.update( camera );
|
|
32
|
+
|
|
33
|
+
const size = renderer.getSize( _size );
|
|
34
|
+
this.setSize( size.width, size.height );
|
|
35
|
+
|
|
36
|
+
const currentAutoClear = renderer.autoClear;
|
|
37
|
+
renderer.autoClear = false;
|
|
38
|
+
|
|
39
|
+
const currentRenderTarget = renderer.getRenderTarget();
|
|
40
|
+
const currentMRT = renderer.getMRT();
|
|
41
|
+
|
|
42
|
+
this._cameraNear.value = camera.near;
|
|
43
|
+
this._cameraFar.value = camera.far;
|
|
44
|
+
|
|
45
|
+
for ( const name in this._previousTextures ) {
|
|
46
|
+
|
|
47
|
+
this.toggleTexture( name );
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
renderer.setRenderTarget( renderTarget );
|
|
52
|
+
renderer.setMRT( this._mrt );
|
|
53
|
+
renderer.clear();
|
|
54
|
+
|
|
55
|
+
renderTarget.scissorTest = true;
|
|
56
|
+
|
|
57
|
+
renderTarget.scissor.set( 0, 0, renderTarget.width / 2, renderTarget.height );
|
|
58
|
+
renderTarget.viewport.set( 0, 0, renderTarget.width / 2, renderTarget.height );
|
|
59
|
+
renderer.render( scene, stereo.cameraL );
|
|
60
|
+
|
|
61
|
+
renderTarget.scissor.set( renderTarget.width / 2, 0, renderTarget.width / 2, renderTarget.height );
|
|
62
|
+
renderTarget.viewport.set( renderTarget.width / 2, 0, renderTarget.width / 2, renderTarget.height );
|
|
63
|
+
renderer.render( scene, stereo.cameraR );
|
|
64
|
+
|
|
65
|
+
renderTarget.scissorTest = false;
|
|
66
|
+
|
|
67
|
+
renderer.setRenderTarget( currentRenderTarget );
|
|
68
|
+
renderer.setMRT( currentMRT );
|
|
69
|
+
|
|
70
|
+
renderer.autoClear = currentAutoClear;
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default StereoPassNode;
|
|
77
|
+
|
|
78
|
+
StereoPassNode.type = /*@__PURE__*/ registerNode( 'StereoPass', StereoPassNode );
|
|
79
|
+
|
|
80
|
+
export const stereoPass = ( scene, camera ) => nodeObject( new StereoPassNode( scene, camera ) );
|