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

WebGPURenderer: Update Packing, Hash, Discard #1205

Merged
merged 5 commits into from
Aug 26, 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
6 changes: 3 additions & 3 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14366,16 +14366,16 @@ index ea9f8658..b81d7761 100644
}
});
diff --git a/examples-testing/examples/webgpu_mrt.ts b/examples-testing/examples/webgpu_mrt.ts
index e1d45570..84c1dfdf 100644
index 3737c463..de4ee03c 100644
--- a/examples-testing/examples/webgpu_mrt.ts
+++ b/examples-testing/examples/webgpu_mrt.ts
@@ -1,4 +1,4 @@
-import * as THREE from 'three';
+import * as THREE from 'three/webgpu';
import {
output,
transformedNormalWorld,
@@ -17,8 +17,8 @@ import { RGBELoader } from 'three/addons/loaders/RGBELoader.js';
transformedNormalView,
@@ -18,8 +18,8 @@ import { RGBELoader } from 'three/addons/loaders/RGBELoader.js';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';

Expand Down
6 changes: 3 additions & 3 deletions types/three/src/nodes/Nodes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export {
} from "./math/MathNode.js";

export { cond, default as CondNode, select } from "./math/CondNode.js";
export { default as HashNode, hash } from "./math/HashNode.js";
export * from "./math/Hash.js";
export {
add,
and,
Expand Down Expand Up @@ -175,14 +175,14 @@ export { triNoise3D } from "./math/TriNoise3D.js";
// utils
export { default as ArrayElementNode } from "./utils/ArrayElementNode.js";
export { default as ConvertNode } from "./utils/ConvertNode.js";
export { default as DiscardNode, discard, Return } from "./utils/DiscardNode.js";
export * from "./utils/Discard.js";
export { default as EquirectUVNode, equirectUV } from "./utils/EquirectUVNode.js";
export { default as JoinNode } from "./utils/JoinNode.js";
export { Break, Continue, default as LoopNode, Loop } from "./utils/LoopNode.js";
export { default as MatcapUVNode, matcapUV } from "./utils/MatcapUVNode.js";
export { default as MaxMipLevelNode, maxMipLevel } from "./utils/MaxMipLevelNode.js";
export { default as OscNode, OscNodeMethod, oscSawtooth, oscSine, oscSquare, oscTriangle } from "./utils/OscNode.js";
export { colorToDirection, default as PackingNode, directionToColor } from "./utils/PackingNode.js";
export * from "./utils/Packing.js";
export { default as ReflectorNode, reflector, ReflectorNodeParameters } from "./utils/ReflectorNode.js";
export { default as RemapNode, remap, remapClamp } from "./utils/RemapNode.js";
export { default as RotateNode, rotate } from "./utils/RotateNode.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import Node from "../core/Node.js";
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";

export default class HashNode extends Node {
seedNode: Node;

constructor(seedNode: Node);
}

export const hash: (seedNode: NodeRepresentation) => ShaderNodeObject<HashNode>;
export const hash: (seed: NodeRepresentation) => ShaderNodeObject<Node>;

declare module "../shadernode/ShaderNode.js" {
interface NodeElements {
Expand Down
11 changes: 11 additions & 0 deletions types/three/src/nodes/utils/Discard.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Node from "../core/Node.js";
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";

export const Discard: (conditional: NodeRepresentation) => ShaderNodeObject<Node>;
export const Return: () => ShaderNodeObject<Node>;

declare module "../shadernode/ShaderNode.js" {
interface NodeElements {
discard: typeof Discard;
}
}
17 changes: 0 additions & 17 deletions types/three/src/nodes/utils/DiscardNode.d.ts

This file was deleted.

5 changes: 5 additions & 0 deletions types/three/src/nodes/utils/Packing.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Node from "../core/Node.js";
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js";

export const directionToColor: (node: NodeRepresentation) => ShaderNodeObject<Node>;
export const colorToDirection: (node: NodeRepresentation) => ShaderNodeObject<Node>;
24 changes: 0 additions & 24 deletions types/three/src/nodes/utils/PackingNode.d.ts

This file was deleted.

Loading