setScissorRect 在 WebGL 和 WebGPU 下效果不一致
xiaoiver opened this issue · 4 comments
xiaoiver commented
Issues-translate-bot commented
xiaoiver commented
固定原点为左下角,在 setViewport / ScissorRect 时,需要换算反转下 Y 轴:
private flipY(y: number, h: number) {
const height = this.device['swapChainHeight'];
return height - y - h;
}
xiaoiver commented
另外在读取纹理数据时,WebGL 同样也是从左下角开始,而 WebGPU 从左上角开始,也需要统一 Readback 中的实现
Issues-translate-bot commented
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
In addition, when reading texture data, WebGL also starts from the lower left corner, while WebGPU starts from the upper left corner, and the implementation in Readback also needs to be unified.