summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/shader_3d/shadow_map_vert.shd
blob: 3f12a69b2baaa616b9735a5b2b46d72717ffb020 (plain) (blame)
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
uniform mat4  uMatrixMvp;

#ifdef VERTEX_POSITION
attribute   vec4  aPosition0;
#endif //VERTEX_POSITION

#ifdef VERTEX_POSITION_BLEND
attribute   vec4  aPosition1;
uniform     float uPositionWeight;
#endif //VERTEX_POSITION_BLEND

void main()
{

#ifdef VERTEX_POSITION_BLEND
   vec4 position = aPosition0 * uPositionWeight +
   aPosition1 * (1.0 - uPositionWeight);
   position = vec4(position.xyz, 1.0);
#else

#ifdef VERTEX_POSITION
   vec4 position = vec4(aPosition0.xyz, 1.0);
#endif // VERTEX_POSITION

#endif //VERTEX_POSITION_BLEND

   gl_Position = uMatrixMvp * position;
}