File: default.vs

package info (click to toggle)
pymol 2.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 43,312 kB
  • sloc: cpp: 480,106; python: 79,860; ansic: 28,343; javascript: 6,792; sh: 47; makefile: 30; csh: 8
file content (36 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (4)
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
30
31
32
33
34
35
36
#include webgl_header.vs

attribute vec4 a_Vertex;
attribute vec3 a_Normal;
attribute vec4 a_Color;

varying vec3 packed_data_0 ;

//varying vec3 N;
#define NORMAL  packed_data_0

#ifdef PURE_OPENGL_ES_2
varying vec4 COLOR;
#else
// using the built-in allows to use glShadeModel
#define COLOR gl_FrontColor = gl_BackColor
#endif

varying float fog;
varying vec2 bgTextureLookup;

void main()
{
#ifdef PYMOL_WEBGL_IOS
  gl_PointSize = g_PointSize;
#endif

  NORMAL = normalize(g_NormalMatrix * a_Normal);
  vec3 eye_pos = vec3(g_ModelViewMatrix * a_Vertex);

  COLOR = a_Color;

  fog = (g_Fog_end + eye_pos.z) * g_Fog_scale;
  gl_Position = g_ProjectionMatrix * g_ModelViewMatrix * a_Vertex;
  bgTextureLookup = (gl_Position.xy/gl_Position.w) / 2.0 + 0.5;
}