Skip to content

Commit 40d7441

Browse files
committed
WaterMesh: Remove unneeded Lambert material.
1 parent adf4a95 commit 40d7441

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

examples/jsm/objects/WaterMesh.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import {
22
Color,
33
Mesh,
44
Vector3,
5-
MeshLambertNodeMaterial
5+
NodeMaterial
66
} from 'three/webgpu';
77

8-
import { Fn, add, cameraPosition, div, normalize, positionWorld, sub, time, texture, vec2, vec3, max, dot, reflect, pow, length, float, uniform, reflector, mul, mix, diffuseColor } from 'three/tsl';
8+
import { Fn, add, cameraPosition, div, normalize, positionWorld, sub, time, texture, vec2, max, dot, reflect, pow, length, float, uniform, reflector, mul, mix } from 'three/tsl';
99

1010
/**
1111
* A basic flat, reflective water effect.
@@ -32,7 +32,7 @@ class WaterMesh extends Mesh {
3232
*/
3333
constructor( geometry, options ) {
3434

35-
const material = new MeshLambertNodeMaterial();
35+
const material = new NodeMaterial();
3636

3737
super( geometry, material );
3838

@@ -155,8 +155,6 @@ class WaterMesh extends Mesh {
155155

156156
material.receivedShadowPositionNode = positionWorld.add( distortion );
157157

158-
material.setupOutgoingLight = () => diffuseColor.rgb; // backwards compatibility
159-
160158
material.colorNode = Fn( () => {
161159

162160
const mirrorSampler = reflector();

0 commit comments

Comments
 (0)