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

NodeMaterial: Add setupOutgoingLight(). #28941

Merged
merged 5 commits into from
Jul 23, 2024
Merged
Prev Previous commit
Next Next commit
Examples: Fix lighting.
  • Loading branch information
Mugen87 committed Jul 23, 2024
commit 856bdb86bcdf73de88ca19a5bfcd68315b845892
7 changes: 7 additions & 0 deletions examples/webgpu_backdrop_area.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@

clock = new THREE.Clock();

const light = new THREE.PointLight( 0xffffff, 50 );
camera.add( light );
scene.add( camera );

const ambient = new THREE.AmbientLight( 0x4466ff, 1 );
scene.add( ambient );

// model

const loader = new GLTFLoader();
Expand Down
2 changes: 1 addition & 1 deletion examples/webgpu_instance_uniform.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
const instanceUniform = nodeObject( new InstanceUniformNode() );
const cubeTextureNode = cubeTexture( cTexture );

const material = new THREE.MeshStandardNodeMaterial();
const material = new THREE.MeshBasicNodeMaterial();
material.colorNode = instanceUniform.add( cubeTextureNode );
material.emissiveNode = instanceUniform.mul( cubeTextureNode );

Expand Down
Loading