diff --git a/examples-testing/index.js b/examples-testing/index.js index 4a636e1d5..21814c6c8 100644 --- a/examples-testing/index.js +++ b/examples-testing/index.js @@ -375,6 +375,7 @@ const files = { // 'webgpu_tsl_transpiler', 'webgpu_video_panorama', 'webgpu_postprocessing_afterimage', + // 'webgpu_postprocessing_anamorphic', // 'webgpu_mirror', // 'webgpu_multisampled_renderbuffers', 'webgpu_materials_texture_anisotropy', diff --git a/three.js b/three.js index bd33e679a..805a72d93 160000 --- a/three.js +++ b/three.js @@ -1 +1 @@ -Subproject commit bd33e679a5b634842bb39a377b9a37eb68bc0e2a +Subproject commit 805a72d93205f6de93c0f531df3b4cf0b06289f9 diff --git a/types/three/examples/jsm/nodes/Nodes.d.ts b/types/three/examples/jsm/nodes/Nodes.d.ts index 62429d9ac..e7e79d49f 100644 --- a/types/three/examples/jsm/nodes/Nodes.d.ts +++ b/types/three/examples/jsm/nodes/Nodes.d.ts @@ -289,6 +289,7 @@ export { hue, lumaCoeffs, luminance, + threshold, ColorAdjustmentMethod, } from './display/ColorAdjustmentNode.js'; export { @@ -327,6 +328,7 @@ export { } from './display/ViewportDepthNode.js'; export { default as GaussianBlurNode, gaussianBlur } from './display/GaussianBlurNode.js'; export { default as AfterImageNode, afterImage } from './display/AfterImageNode.js'; +export { default as AnamorphicNode, anamorphic } from './display/AnamorphicNode.js'; export { default as PassNode, pass, depthPass, PassNodeScope } from './display/PassNode.js'; diff --git a/types/three/examples/jsm/nodes/display/AfterImageNode.d.ts b/types/three/examples/jsm/nodes/display/AfterImageNode.d.ts index ede5b1630..29a7c7990 100644 --- a/types/three/examples/jsm/nodes/display/AfterImageNode.d.ts +++ b/types/three/examples/jsm/nodes/display/AfterImageNode.d.ts @@ -11,6 +11,8 @@ export default class AfterImageNode extends TempNode { constructor(textureNode: Node, damp?: number); + getTextureNode(): TextureNode; + setSize(width: number, height: number): void; } diff --git a/types/three/examples/jsm/nodes/display/AnamorphicNode.d.ts b/types/three/examples/jsm/nodes/display/AnamorphicNode.d.ts new file mode 100644 index 000000000..001be92aa --- /dev/null +++ b/types/three/examples/jsm/nodes/display/AnamorphicNode.d.ts @@ -0,0 +1,32 @@ +import { Vector2 } from '../../../../src/Three.js'; +import Node from '../core/Node.js'; +import TempNode from '../core/TempNode.js'; +import TextureNode from '../accessors/TextureNode.js'; +import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js'; + +export default class AnamorphicNode extends TempNode { + textureNode: TextureNode; + thresholdNode: Node; + scaleNode: Node; + samples: number; + resolution: Vector2; + + constructor(textureNode: TextureNode, thresholdNode: Node, scaleNode: Node, samples: number); + + getTextureNode(): TextureNode; + + setSize(width: number, height: number): void; +} + +export const anamorphic: ( + node: TextureNode, + threshold?: NodeRepresentation, + scale?: NodeRepresentation, + samples?: NodeRepresentation, +) => ShaderNodeObject; + +declare module '../shadernode/ShaderNode.js' { + interface NodeElements { + anamorphic: typeof anamorphic; + } +} diff --git a/types/three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts b/types/three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts index 5f21b2cce..b74114b1a 100644 --- a/types/three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +++ b/types/three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts @@ -36,10 +36,13 @@ export const hue: ( export const lumaCoeffs: ShaderNodeObject; export const luminance: (a: NodeRepresentation, b: NodeRepresentation) => ShaderNodeObject; +export const threshold: (color: NodeRepresentation, thershold: NodeRepresentation) => ShaderNodeObject; + declare module '../shadernode/ShaderNode.js' { interface NodeElements { saturation: typeof saturation; vibrance: typeof vibrance; hue: typeof hue; + threshold: typeof threshold; } } diff --git a/types/three/examples/jsm/nodes/display/GaussianBlurNode.d.ts b/types/three/examples/jsm/nodes/display/GaussianBlurNode.d.ts index 0f2b061e7..658167b84 100644 --- a/types/three/examples/jsm/nodes/display/GaussianBlurNode.d.ts +++ b/types/three/examples/jsm/nodes/display/GaussianBlurNode.d.ts @@ -15,6 +15,8 @@ export default class GaussianBlurNode extends TempNode { constructor(textureNode: TextureNode, sigma?: number); setSize(width: number, height: number): void; + + getTextureNode(): TextureNode; } export const gaussianBlur: (node: NodeRepresentation, sigma?: number) => ShaderNodeObject; diff --git a/types/three/examples/jsm/nodes/display/PassNode.d.ts b/types/three/examples/jsm/nodes/display/PassNode.d.ts index 0c7e958bc..8229b37a2 100644 --- a/types/three/examples/jsm/nodes/display/PassNode.d.ts +++ b/types/three/examples/jsm/nodes/display/PassNode.d.ts @@ -40,4 +40,5 @@ export default class PassNode extends TempNode { export type PassNodeScope = typeof PassNode.COLOR | typeof PassNode.DEPTH; export const pass: (scene: Scene, camera: Camera) => ShaderNodeObject; +export const texturePass: (pass: PassNode, texture: Texture) => ShaderNodeObject; export const depthPass: (scene: Scene, camera: Camera) => ShaderNodeObject;