Skip to content

Commit 021c0ed

Browse files
committed
Added normalMap to floor.
1 parent 00855c6 commit 021c0ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/webgpu_reflection.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
const floorNormal = textureLoader.load( 'textures/floors/FloorsCheckerboard_S_Normal.jpg' );
8686
floorNormal.wrapS = THREE.RepeatWrapping;
8787
floorNormal.wrapT = THREE.RepeatWrapping;
88+
floorNormal.repeat.set( 15, 15 );
8889

8990
// tree
9091

@@ -105,6 +106,8 @@
105106

106107
const floorMaterial = new THREE.MeshPhongNodeMaterial();
107108
floorMaterial.colorNode = texture( floorColor, floorUV ).add( reflection );
109+
floorMaterial.normalMap = floorNormal;
110+
floorMaterial.normalScale.set( 0.2, - 0.2 );
108111

109112
const floor = new THREE.Mesh( new THREE.BoxGeometry( 50, .001, 50 ), floorMaterial );
110113
floor.receiveShadow = true;
@@ -261,7 +264,7 @@
261264

262265
// color
263266

264-
color.setHSL( ( count / maxSteps ) * 0.5 + Math.random() * 0.05, 0.75, 0.7 + Math.random() * 0.1 );
267+
color.setHSL( ( count / maxSteps ) * 0.5 + Math.random() * 0.05, 0.75, 0.6 + Math.random() * 0.1 );
265268
colors.push( color.r, color.g, color.b );
266269

267270
// to save vertex buffers, we store the size, time and seed in a single attribute

0 commit comments

Comments
 (0)