Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSL: Update DoF node and example #1085

Merged
merged 5 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14396,13 +14396,13 @@ index 4c3a1d66..4337b2c8 100644
postProcessing.outputNode = combinedPass;

diff --git a/examples-testing/examples/webgpu_postprocessing_dof.ts b/examples-testing/examples/webgpu_postprocessing_dof.ts
index 3c7870c8..f1dbc7cb 100644
index 3fb4046b..785a78f8 100644
--- a/examples-testing/examples/webgpu_postprocessing_dof.ts
+++ b/examples-testing/examples/webgpu_postprocessing_dof.ts
@@ -1,4 +1,4 @@
-import * as THREE from 'three';
+import * as THREE from 'three/webgpu';
import { cubeTexture, positionWorld, oscSine, timerGlobal, pass } from 'three/tsl';
import { cubeTexture, positionWorld, oscSine, timerGlobal, pass, uniform } from 'three/tsl';

import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
@@ -7,7 +7,11 @@ import Stats from 'three/addons/libs/stats.module.js';
Expand All @@ -14427,8 +14427,8 @@ index 3c7870c8..f1dbc7cb 100644

init();

@@ -127,7 +131,7 @@ function init() {
updateEffect();
@@ -124,7 +128,7 @@ function init() {
gui.add(effectController.maxblur, 'value', 0.0, 0.01, 0.001).name('maxblur');
}

-function onPointerMove(event) {
Expand Down
8 changes: 4 additions & 4 deletions types/three/src/nodes/display/DepthOfFieldNode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ export default class DepthOfFieldNode extends TempNode {
aperture: UniformNode<number>;
maxblur: UniformNode<number>;

constructor(textureNode: TextureNode, viewZNode: Node, focus?: number, aperture?: number, maxblur?: number);
constructor(textureNode: TextureNode, viewZNode: Node, focusNode: Node, apertureNode: Node, maxblurNode: Node);
}

export const dof: (
node: NodeRepresentation,
viewZNode: NodeRepresentation,
focus?: number,
aperture?: number,
maxblur?: number,
focus?: NodeRepresentation,
aperture?: NodeRepresentation,
maxblur?: NodeRepresentation,
) => ShaderNodeObject<DepthOfFieldNode>;

declare module "../shadernode/ShaderNode.js" {
Expand Down
Loading