"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "data/shaders/default.vs" between
pymol-v2.1.0.tar.bz2 and pymol-open-source-2.2.0.tar.gz

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

default.vs  (pymol-v2.1.0.tar.bz2):default.vs  (pymol-open-source-2.2.0)
varying vec3 N, L0, H0, L1, H1; #include webgl_header.vs
varying vec4 D0, A0, D1, A1;
varying float fog; attribute vec4 a_Vertex;
attribute vec3 a_Normal;
attribute vec4 a_Color;
varying vec3 fog_color; varying vec3 packed_data_0 ;
uniform bool lighting_enabled; //varying vec3 N;
#define NORMAL packed_data_0
uniform bool bg_gradient; #ifdef PURE_OPENGL_ES_2
uniform vec3 fog_color_top; varying vec4 COLOR;
uniform vec3 fog_color_bottom; #else
// using the built-in allows to use glShadeModel
#define COLOR gl_FrontColor = gl_BackColor
#endif
varying float fog;
varying vec2 bgTextureLookup;
void main() void main()
{ {
N = normalize(gl_NormalMatrix * gl_Normal); #ifdef PYMOL_WEBGL_IOS
vec3 eye_pos = vec3(gl_ModelViewMatrix * gl_Vertex); gl_PointSize = g_PointSize;
vec3 aux = vec3(gl_LightSource[0].position - vec4(eye_pos, 1.0)); #endif
if (lighting_enabled){
L0 = normalize(aux); NORMAL = normalize(g_NormalMatrix * a_Normal);
H0 = normalize(gl_LightSource[0].halfVector.xyz); vec3 eye_pos = vec3(g_ModelViewMatrix * a_Vertex);
aux = vec3(gl_LightSource[1].position - vec4(eye_pos, 1.0));
L1 = normalize(aux); COLOR = a_Color;
H1 = normalize(gl_LightSource[1].halfVector.xyz);
A0 = gl_LightSource[0].ambient * gl_Color; fog = (g_Fog_end + eye_pos.z) * g_Fog_scale;
D0 = gl_LightSource[0].diffuse * gl_Color; gl_Position = g_ProjectionMatrix * g_ModelViewMatrix * a_Vertex;
A1 = gl_LightSource[1].ambient * gl_Color; bgTextureLookup = (gl_Position.xy/gl_Position.w) / 2.0 + 0.5;
D1 = gl_LightSource[1].diffuse * gl_Color;
A0.a = gl_Color.a;
A1.a = 0.;
} else {
A0 = gl_Color;
}
gl_FogFragCoord = -eye_pos.z;
fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale;
gl_Position = gl_ModelViewProjectionMatrix * a_Vertex;
if (bg_gradient){
fog_color = mix(fog_color_bottom, fog_color_top, (1. + gl_Position.y/gl_Posi
tion.w)/2.);
} else {
fog_color = fog_color_top;
}
gl_Position = ftransform();
} }
 End of changes. 5 change blocks. 
36 lines changed or deleted 29 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)