提交 5b6b120c 编写于 作者: E Emmett Lalish

added setScissor

上级 bf3009e0
......@@ -369,8 +369,13 @@ THREE.PMREMGenerator = ( function () {
function _setViewport( x, y, width, height ) {
var dpr = _renderer.getPixelRatio();
_renderer.setViewport( x / dpr, y / dpr, width / dpr, height / dpr );
var invDpr = 1.0 / _renderer.getPixelRatio();
x *= invDpr;
y *= invDpr;
width *= invDpr;
height *= invDpr;
_renderer.setViewport( x, y, width, height );
_renderer.setScissor( x, y, width, height );
}
......
......@@ -395,8 +395,13 @@ var PMREMGenerator = ( function () {
function _setViewport( x, y, width, height ) {
var dpr = _renderer.getPixelRatio();
_renderer.setViewport( x / dpr, y / dpr, width / dpr, height / dpr );
var invDpr = 1.0 / _renderer.getPixelRatio();
x *= invDpr;
y *= invDpr;
width *= invDpr;
height *= invDpr;
_renderer.setViewport( x, y, width, height );
_renderer.setScissor( x, y, width, height );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册