How to reference to the components of vec in shader programming?
By Jean Yang22p
2015年 08月 20日 01:58
A vector in shading language can be seen as different types of data. When it is take as color, it has 4 components: r, g, b, a; If take it as position, it has 4 components: x, y, z, w; If take it as texture, it has 4 components: s, t, p, q;