blob: 1c49d9dec3e4f4103900eed6701c9fc27b607057 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
uniform mat4 ViewProjectionMatrix;
uniform float alpha;
/* ---- Instanciated Attribs ---- */
in vec3 pos;
/* ---- Per instance Attribs ---- */
in mat4 InstanceModelMatrix;
in vec3 color;
#ifdef UNIFORM_SCALE
in float size;
#else
in vec3 size;
#endif
flat out vec4 finalColor;
void main()
{
gl_Position = ViewProjectionMatrix * InstanceModelMatrix * vec4(pos * size, 1.0);
finalColor = vec4(color, alpha);
}
|