根据这里的文档,看起来COLOR_ATTACHMENTS
我们可以使用16 个webgl2
。但是,当我打印时:
console.log(gl.getParameter(gl.MAX_COLOR_ATTACHMENTS));
它8
在控制台中返回。
我在互联网上搜索以了解是否有允许我们使用 16 的扩展程序COLOR_ATTACHMENTS
,但我找不到任何扩展程序。有谁知道这里有什么问题?
先感谢您。
根据这里的文档,看起来COLOR_ATTACHMENTS
我们可以使用16 个webgl2
。但是,当我打印时:
console.log(gl.getParameter(gl.MAX_COLOR_ATTACHMENTS));
它8
在控制台中返回。
我在互联网上搜索以了解是否有允许我们使用 16 的扩展程序COLOR_ATTACHMENTS
,但我找不到任何扩展程序。有谁知道这里有什么问题?
先感谢您。
The documentation you linked to does not say there are 16 color attachments. It just lists constants for 16. How many you actually get is GPU/driver/browser dependent.
According to the spec section 6.2 page 272, 4 is the minimum required by WebGL2, some devices support more than 4. Checking WebGLStats it looks like the most supported is 8.
Note: According to the creator of WebGLStats the reason that there's a tiny percentage reporting only 1 is because some webpages sharing their stats either by their browser or other reasons are falsely claiming WebGL2 support when they don't actually support it.