【发布时间】:2018-03-15 03:45:49
【问题描述】:
以下属性看起来不错:
attribute vec4 coord;
以下属性抱怨属性“不能是 bool 或 int”:
attribute int ty;
以下属性抱怨“语法错误”:
attribute uint ty;
这些结果似乎相当随意。我找不到顶点着色器属性的有效类型列表。 属性类型在WebGL中是否有效的规则是什么?
【问题讨论】:
-
您可能会发现参考图表很有用。 Here's the one for WebGL 和 Here's the one for WebGL2。对于 WebGL1,它们位于页面右侧,“限定符”下方。遗憾的是,它们并未针对 WebGL2 列出,但 WebGL2 添加了 int、ivec2、ivec3、ivec4、uint、uvec2、uvec3、uvec4 以及所有新的非方阵类型
标签: opengl-es webgl vertex-shader