mirror of https://github.com/CGAL/cgal
25 lines
601 B
V
25 lines
601 B
V
#version 120
|
|
attribute highp vec4 vertex;
|
|
attribute highp vec3 normals;
|
|
attribute highp vec3 colors;
|
|
attribute highp vec3 center;
|
|
attribute highp float radius;
|
|
uniform highp mat4 mvp_matrix;
|
|
uniform highp mat4 mv_matrix;
|
|
varying highp vec4 fP;
|
|
varying highp vec3 fN;
|
|
varying highp vec4 color;
|
|
varying highp float dist[6];
|
|
|
|
|
|
void main(void)
|
|
{
|
|
for(int i=0; i<6; ++i)
|
|
dist[i] = 1;
|
|
color = vec4(colors, 1.0);
|
|
fP = mv_matrix * vertex;
|
|
fN = mat3(mv_matrix)* normals;
|
|
gl_Position = mvp_matrix *
|
|
vec4(radius*vertex.x + center.x, radius* vertex.y + center.y, radius*vertex.z + center.z, 1.0) ;
|
|
}
|