|
@@ -278,8 +278,8 @@ function WebGLRenderer( parameters ) {
|
|
utils = new WebGLUtils( _gl, extensions, capabilities );
|
|
utils = new WebGLUtils( _gl, extensions, capabilities );
|
|
|
|
|
|
state = new WebGLState( _gl, extensions, utils, capabilities );
|
|
state = new WebGLState( _gl, extensions, utils, capabilities );
|
|
- state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ) );
|
|
|
|
- state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ) );
|
|
|
|
|
|
+ state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );
|
|
|
|
+ state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );
|
|
|
|
|
|
info = new WebGLInfo( _gl );
|
|
info = new WebGLInfo( _gl );
|
|
properties = new WebGLProperties();
|
|
properties = new WebGLProperties();
|
|
@@ -393,8 +393,8 @@ function WebGLRenderer( parameters ) {
|
|
_width = width;
|
|
_width = width;
|
|
_height = height;
|
|
_height = height;
|
|
|
|
|
|
- _canvas.width = width * _pixelRatio;
|
|
|
|
- _canvas.height = height * _pixelRatio;
|
|
|
|
|
|
+ _canvas.width = Math.floor( width * _pixelRatio );
|
|
|
|
+ _canvas.height = Math.floor( height * _pixelRatio );
|
|
|
|
|
|
if ( updateStyle !== false ) {
|
|
if ( updateStyle !== false ) {
|
|
|
|
|
|
@@ -417,7 +417,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- return target.set( _width * _pixelRatio, _height * _pixelRatio );
|
|
|
|
|
|
+ return target.set( _width * _pixelRatio, _height * _pixelRatio ).floor();
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
@@ -428,8 +428,8 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
_pixelRatio = pixelRatio;
|
|
_pixelRatio = pixelRatio;
|
|
|
|
|
|
- _canvas.width = width * pixelRatio;
|
|
|
|
- _canvas.height = height * pixelRatio;
|
|
|
|
|
|
+ _canvas.width = Math.floor( width * pixelRatio );
|
|
|
|
+ _canvas.height = Math.floor( height * pixelRatio );
|
|
|
|
|
|
this.setViewport( 0, 0, width, height );
|
|
this.setViewport( 0, 0, width, height );
|
|
|
|
|
|
@@ -467,7 +467,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ) );
|
|
|
|
|
|
+ state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
@@ -489,7 +489,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ) );
|
|
|
|
|
|
+ state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
@@ -2447,8 +2447,8 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
|
- _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio );
|
|
|
|
- _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio );
|
|
|
|
|
|
+ _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor();
|
|
|
|
+ _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor();
|
|
_currentScissorTest = _scissorTest;
|
|
_currentScissorTest = _scissorTest;
|
|
|
|
|
|
}
|
|
}
|