Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cc0423

Browse files
committed
Same tweaks also for bump mapped skin example.
Here gains are a bit smaller but still quite noticeable on slow machines: 20 fps => ~25-27 fps
1 parent 6de5d94 commit 5cc0423

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

examples/webgl_materials_bumpmap_skin.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179

180180
//
181181

182-
renderer = new THREE.WebGLRenderer( { antialias: true, clearColor: 0x060708, clearAlpha: 1 } );
182+
renderer = new THREE.WebGLRenderer( { antialias: false, clearColor: 0x060708, clearAlpha: 1, alpha: false } );
183183
renderer.setSize( window.innerWidth, window.innerHeight );
184184
container.appendChild( renderer.domElement );
185185

@@ -245,24 +245,27 @@
245245

246246
var mapHeight = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Infinite-Level_02_Disp_NoSmoothUV-4096.jpg" );
247247

248-
mapHeight.anisotropy = 16;
248+
mapHeight.anisotropy = 4;
249249
mapHeight.repeat.set( 0.998, 0.998 );
250250
mapHeight.offset.set( 0.001, 0.001 )
251251
mapHeight.wrapS = mapHeight.wrapT = THREE.RepeatWrapping;
252+
mapHeight.format = THREE.RGBFormat;
252253

253254
var mapSpecular = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Map-SPEC.jpg" );
254255

255-
mapSpecular.anisotropy = 16;
256+
mapSpecular.anisotropy = 4;
256257
mapSpecular.repeat.set( 0.998, 0.998 );
257258
mapSpecular.offset.set( 0.001, 0.001 )
258259
mapSpecular.wrapS = mapSpecular.wrapT = THREE.RepeatWrapping;
260+
mapSpecular.format = THREE.RGBFormat;
259261

260262
var mapColor = THREE.ImageUtils.loadTexture( "obj/leeperrysmith/Map-COL.jpg" );
261263

262-
mapColor.anisotropy = 16;
264+
mapColor.anisotropy = 4;
263265
mapColor.repeat.set( 0.998, 0.998 );
264266
mapColor.offset.set( 0.001, 0.001 )
265267
mapColor.wrapS = mapColor.wrapT = THREE.RepeatWrapping;
268+
mapColor.format = THREE.RGBFormat;
266269

267270
var shader = THREE.ShaderSkin[ "skinSimple" ];
268271

0 commit comments

Comments
 (0)