I saw in some places the following code snippet in the Fragment shader.
"uniform sampler2D s_tex0;
varying vec2 v_texCoord;
varying vec4 v_primaryColor;
gl_FragColor = texture2D(s_tex0, v_texCoord) * v_primaryColor;
In the main() function, since the build-in function texture2D returns a vec4, is that legal for two vec4s to do a multiplication like that? What’s the result of vec4_foo * vec4_bar? A cross multiplication?
Thanks a lot.