blob: 14450037ca8bbe7d2f44c8464106909dbdea173b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef USE_GPU_SHADER_CREATE_INFO
uniform mat4 ViewProjectionMatrix;
/* ---- Instantiated Attrs ---- */
in vec3 pos;
/* ---- Per instance Attrs ---- */
in mat4 InstanceModelMatrix;
in vec4 color;
# ifdef UNIFORM_SCALE
in float size;
# else
in vec3 size;
# endif
flat out vec4 finalColor;
#endif
void main()
{
finalColor = color;
vec4 wPos = InstanceModelMatrix * vec4(pos * size, 1.0);
gl_Position = ViewProjectionMatrix * wPos;
#ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_calc_clip_distance(wPos.xyz);
#endif
}
|