File: connector.fs

package info (click to toggle)
pymol 3.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 74,084 kB
  • sloc: cpp: 482,660; python: 89,328; ansic: 29,512; javascript: 6,792; sh: 84; makefile: 25
file content (43 lines) | stat: -rw-r--r-- 841 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
37
38
39
40
41
42
43
#include webgl_header.fs

varying vec3 NORMAL ;
#ifdef use_geometry_shaders
varying vec4 COLOR ;
#else
varying vec4 COLORIn ;
#define COLOR COLORIn
#endif

varying float fog;
varying vec2 bgTextureLookup;

#ifdef use_geometry_shaders
varying float lineEdge;
varying float aaCutoff;
#endif

#include anaglyph_header.fs
#include compute_fog_color.fs

float mysmoothstep(float edge0, float edge1, float x){
  float rets = step(edge0, edge1) * step(edge1, edge0);
  return rets * step(edge0, x) + (1.-rets) * smoothstep(edge0, edge1, x);
}

void main()
{
  float alpha = COLOR.a;

#ifdef use_geometry_shaders
#ifdef line_smooth
  alpha *= mysmoothstep(0., aaCutoff, 1. - abs(lineEdge));
#endif
#endif

  vec4 color = ApplyColorEffects(COLOR, gl_FragCoord.z);

  gl_FragColor = ApplyFog(vec4(color.rgb, alpha), fog);

  PostLightingEffects();
}