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: NodeMaterial extends Material #28313

Merged
merged 2 commits into from
May 13, 2024
Merged
Changes from 1 commit
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
Next Next commit
NodeMaterial extends Material
sunag committed May 8, 2024
commit 49933c204bbd5792becc8b0060cb7e69dfb6c3d5
6 changes: 2 additions & 4 deletions examples/jsm/nodes/materials/NodeMaterial.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Material, ShaderMaterial } from 'three';
import { Material } from 'three';
import { getNodeChildren, getCacheKey } from '../core/NodeUtils.js';
import { attribute } from '../core/AttributeNode.js';
import { output, diffuseColor, varyingProperty } from '../core/PropertyNode.js';
@@ -27,7 +27,7 @@ import { faceDirection } from '../display/FrontFacingNode.js';

const NodeMaterials = new Map();

class NodeMaterial extends ShaderMaterial {
class NodeMaterial extends Material {

constructor() {

@@ -458,8 +458,6 @@ class NodeMaterial extends ShaderMaterial {

}

Object.assign( this.defines, material.defines );

const descriptors = Object.getOwnPropertyDescriptors( material.constructor.prototype );

for ( const key in descriptors ) {