Welcome to mirror list, hosted at ThFree Co, Russian Federation.

trackpoint.vsh.glsl « shaders « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7d658bc5ed0a124df333c2852ea70d02f5b67eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
attribute vec3 a_normal;
attribute vec3 a_position;
attribute vec4 a_color;

uniform mat4 modelView;
uniform mat4 projection;
uniform mat4 pivotTransform;

varying vec3 v_radius;
varying vec4 v_color;

void main()
{
  vec3 radius = a_normal * a_position.z;
  vec4 pos = vec4(a_position.xy, 0, 1) * modelView;
  vec4 shiftedPos = vec4(radius.xy, 0, 0) + pos;
  gl_Position = applyPivotTransform(shiftedPos * projection, pivotTransform, 0.0);

  v_radius = radius;
  v_color = a_color;
}