-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Nodes: Add PixelationNode * Update three.js * Add examples * Update patch and delete examples * Add examples * Update patch and delete examples * Format
- Loading branch information
1 parent
102cd9a
commit 124f03a
Showing
4 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule three.js
updated
46 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { Camera } from "../../cameras/Camera.js"; | ||
import { Scene } from "../../scenes/Scene.js"; | ||
import Node from "../core/Node.js"; | ||
import TempNode from "../core/TempNode.js"; | ||
import UniformNode from "../core/UniformNode.js"; | ||
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js"; | ||
import PassNode from "./PassNode.js"; | ||
|
||
declare class PixelationNode extends TempNode { | ||
textureNode: Node; | ||
depthNode: Node; | ||
normalNode: Node; | ||
|
||
pixelSize: Node; | ||
normalEdgeStrength: Node; | ||
depthEdgeStrength: Node; | ||
|
||
constructor( | ||
textureNode: Node, | ||
depthNode: Node, | ||
normalNode: Node, | ||
pixelSize: Node, | ||
normalEdgeStrength: Node, | ||
depthEdgeStrength: Node, | ||
); | ||
} | ||
|
||
declare const pixelation: ( | ||
node: NodeRepresentation, | ||
depthNode: NodeRepresentation, | ||
normalNode: NodeRepresentation, | ||
pixelSize?: number, | ||
normalEdgeStrength?: number, | ||
depthEdgeStrength?: number, | ||
) => ShaderNodeObject<PixelationNode>; | ||
|
||
declare module "../shadernode/ShaderNode.js" { | ||
interface NodeElements { | ||
pixelation: typeof pixelation; | ||
} | ||
} | ||
|
||
declare class PixelationPassNode extends PassNode { | ||
pixelSize: UniformNode<number>; | ||
normalEdgeStrength: UniformNode<number>; | ||
depthEdgeStrength: UniformNode<number>; | ||
|
||
readonly isPixelationPassNode: true; | ||
|
||
constructor( | ||
scene: Scene, | ||
camera: Camera, | ||
pixelSize: number, | ||
normalEdgeStrength: number, | ||
depthEdgeStrength: number, | ||
); | ||
} | ||
|
||
export const pixelationPass: ( | ||
scene: Scene, | ||
camera: Camera, | ||
pixelSize: UniformNode<number>, | ||
normalEdgeStrength: UniformNode<number>, | ||
depthEdgeStrength: UniformNode<number>, | ||
) => ShaderNodeObject<PixelationPassNode>; | ||
|
||
export default PixelationPassNode; |