Advertisement
Guest User

Untitled

a guest
May 22nd, 2014
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. PyMOL(TM) Molecular Graphics System, Version 1.7.1.0.
  2. Copyright (c) Schrodinger, LLC.
  3. All Rights Reserved.
  4.  
  5. Created by Warren L. DeLano, Ph.D.
  6.  
  7. PyMOL is user-supported open-source software. Although some versions
  8. are freely available, PyMOL is not in the public domain.
  9.  
  10. If PyMOL is helpful in your work or study, then please volunteer
  11. support for our ongoing efforts to create open and affordable scientific
  12. software by purchasing a PyMOL Maintenance and/or Support subscription.
  13.  
  14. More information can be found at "http://www.pymol.org".
  15.  
  16. Enter "help" for a list of commands.
  17. Enter "help <command-name>" for information on a specific command.
  18.  
  19. Hit ESC anytime to toggle between text and graphics.
  20.  
  21. Detected OpenGL version 2.0 or greater. Shaders available.
  22. CShaderPrg_New-Error: vertex shader compilation failed name='default'; log follows.
  23. infoLog=ERROR: 0:1: '' : #version required and missing.
  24. ERROR: 0:1: 'attribute' : syntax error syntax error
  25.  
  26. shader: attribute vec4 a_Vertex;
  27. attribute vec3 a_Normal;
  28. attribute vec4 a_Color;
  29. attribute float a_Accessibility; /* This is for ambient occlusion, 1.0 by default */
  30.  
  31. varying vec3 packed_data_0 ;
  32. varying vec4 packed_data_1 ;
  33. varying vec4 packed_data_2 ;
  34. varying vec4 packed_data_3 ;
  35. varying vec4 packed_data_4 ;
  36.  
  37. //varying vec3 N;
  38. #define NORMAL packed_data_0
  39. #define COLOR packed_data_3
  40. //#define fog packed_data_1.w
  41. #define E 2.718281828459045
  42. /* this doesn't work for setting fog_color, need to set the values independently */
  43. //#define fog_color ( packed_data_1.x, packed_data_1.y, packed_data_1.z )
  44.  
  45. varying float fog;
  46. varying vec2 bgTextureLookup;
  47. uniform vec2 t2PixelSize;
  48.  
  49. uniform bool lighting_enabled;
  50.  
  51. uniform bool bg_gradient;
  52. uniform float ambient_occlusion_scale;
  53. uniform int accessibility_mode;
  54. uniform float accessibility_mode_on;
  55.  
  56. void main()
  57. {
  58. NORMAL = normalize(gl_NormalMatrix * a_Normal);
  59. vec3 eye_pos = vec3(gl_ModelViewMatrix * a_Vertex);
  60. vec4 COLORa;
  61. if (accessibility_mode == 1){
  62. COLORa = vec4(clamp(a_Color.xyz * (1.-(ambient_occlusion_scale*a_Accessibility)), 0., 1.), a_Color.w);
  63. } else if (accessibility_mode == 2){
  64. COLORa = vec4(a_Color.xyz * cos(90.*radians(clamp(ambient_occlusion_scale*a_Accessibility, 0., 1.))), a_Color.w);
  65. } else {
  66. COLORa = vec4(clamp(a_Color.xyz * (1. / (1. + pow(E, 0.5 * ( (ambient_occlusion_scale * a_Accessibility) - 10.)))), 0., 1.), a_Color.w);
  67. }
  68. COLOR = mix(a_Color, COLORa, accessibility_mode_on);
  69. // This was breaking fog on ATI/Linux
  70. // gl_FogFragCoord = -eye_pos.z;
  71. // fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale;
  72. fog = (gl_Fog.end - abs(eye_pos.z)) * gl_Fog.scale;
  73. gl_Position = gl_ModelViewProjectionMatrix * a_Vertex;
  74. bgTextureLookup = (gl_Position.xy/gl_Position.w) / 2.0 + 0.5;
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement