glsl vector plus scalar

╄→尐↘猪︶ㄣ 提交于 2019-11-28 13:49:35

http://www.opengl.org/registry/doc/GLSLangSpec.3.30.6.pdf

From 5.9

The arithmetic binary operators add (+), subtract (-), multiply (*), and divide (/) operate on integer and floating-point scalars, vectors, and matrices.

(...)

One operand is a scalar, and the other is a vector or matrix. In this case, the scalar operation is applied independently to each component of the vector or matrix, resulting in the same size vector or matrix.

So if it doesn't compile on ATI, it just means its driver is incorrect in that regard.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!