File: label.fs

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 (42 lines) | stat: -rw-r--r-- 808 bytes parent folder | download | duplicates (3)
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
37
38
39
40
41
42
#include webgl_header.fs

#ifdef PURE_OPENGL_ES_2
precision highp float;
#endif

/* ios recent */
uniform sampler2D textureMap;
varying vec2 textureLookup ;
varying vec4 pickcolor ;

varying float fog;
varying vec3 normalizedViewCoordinate;
#define bgTextureLookup normalizedViewCoordinate.xy

#include anaglyph_header.fs
#include compute_fog_color.fs

void main()
{
  if (isPicking) {
    gl_FragColor = pickcolor;
  } else {
    gl_FragColor = texture2D(textureMap, textureLookup);

#ifdef PYMOL_IOS
    if (gl_FragColor.a < .1)
      discard;
#else
    if (gl_FragColor.a < .05)
      discard;
#endif

    gl_FragColor = ApplyColorEffects(gl_FragColor, gl_FragCoord.z);
    gl_FragColor = ApplyFog(gl_FragColor, fog);

#ifdef NO_ORDER_TRANSP
    setFragDataForNoOrderTransp(gl_FragCoord.z);
#endif
  }
}