EXRLoader: fix decoding vertical indexing

上级 d4ad0e7c
......@@ -2160,7 +2160,7 @@ THREE.EXRLoader.prototype = Object.assign( Object.create( THREE.DataTextureLoade
for ( let w = 0; w < width; ++ w ) {
i = h * width * 4 + w * 4;
j = ( height - h ) * width * 4 + w * 4;
j = ( height - 1 - h ) * width * 4 + w * 4;
const red = byteArray[ j ];
const green = byteArray[ j + 1 ];
......
......@@ -2175,7 +2175,7 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
for ( let w = 0; w < width; ++ w ) {
i = h * width * 4 + w * 4;
j = ( height - h ) * width * 4 + w * 4;
j = ( height - 1 - h ) * width * 4 + w * 4;
const red = byteArray[ j ];
const green = byteArray[ j + 1 ];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册