-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setImageData 报错 #102
Comments
Title: setImageData error report |
另外 LUMINANCE 并不是可读的,无法使用 readPixels 读取数据 正确用法如下: const dataTexture = device.createTexture({
format: Format.U8_LUMINANCE,
width: 1,
height: 1,
usage: TextureUsage.SAMPLED,
pixelStore: {
unpackFlipY: false,
packAlignment: 1, // deal with 1 byte at a time
},
mipLevelCount: 0, // don't mipmap
}); |
* Fix 102 (#103) * fix: split Format.ALPHA and LUMINANCE #102 * chore: commit changeset * chore(release): bump version (#104) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
如下代码在 WebGL2 下报错: const floatRGB = device.createTexture({
format: Format.F32_RGB,
width: 1,
height: 1,
usage: TextureUsage.SAMPLED,
});
floatRGB.setImageData([new Float32Array([10, 20, 30])]);
原因是 WebGL2 中 internal format 可以与 format 不同,对应关系如下: 例如这里 internal format 应该是 gl.RGB32F,format 为 gl.RGB |
* Fix 102 (#106) * fix: use internal format in webgl2 #102 * chore: commit changeset * chore(release): bump version (#107) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
antvis/L7#2128 (comment)
报错信息如下:
The text was updated successfully, but these errors were encountered: