提交 e7e032ce 编写于 作者: M Michael Herzog 提交者: Mr.doob

WebGLRenderer: Allow zero values for x,y in .readRenderTargetPixels

上级 b363c5bb
......@@ -3385,7 +3385,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)
if ( ( x > 0 && x <= ( renderTarget.width - width ) ) && ( y > 0 && y <= ( renderTarget.height - height ) ) ) {
if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {
_gl.readPixels( x, y, width, height, paramThreeToGL( texture.format ), paramThreeToGL( texture.type ), buffer );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册