File tree Expand file tree Collapse file tree 2 files changed +333
-312
lines changed Expand file tree Collapse file tree 2 files changed +333
-312
lines changed Original file line number Diff line number Diff line change 414
414
415
415
},
416
416
417
+ // https://en.wikipedia.org/wiki/Linear_interpolation
418
+
419
+ lerp: function ( x, y, t ) {
420
+
421
+ return ( 1 - t ) * x + t * y;
422
+
423
+ },
424
+
417
425
// http://en.wikipedia.org/wiki/Smoothstep
418
426
419
427
smoothstep: function ( x, min, max ) {
17632
17640
17633
17641
_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
17634
17642
_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
17643
+
17644
+ if ( texture.isDataTexture && texture.unpackAlignment !== 1 &&
17645
+ exports.Math.isPowerOfTwo( texture.image.width ) === false &&
17646
+ texture.format === RGBFormat &&
17647
+ texture.type === UnsignedByteType ) {
17648
+
17649
+ console.warn( 'THREE.WebGLRenderer: Changed unpackAlignment to 1. See #9566.', texture );
17650
+ texture.unpackAlignment = 1;
17651
+
17652
+ }
17653
+
17635
17654
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
17636
17655
17637
17656
var image = clampToMaxSize( texture.image, capabilities.maxTextureSize );
You can’t perform that action at this time.
0 commit comments