"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "data/shaders/default.fs" 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.fs  (pymol-v2.1.0.tar.bz2):default.fs  (pymol-open-source-2.2.0)
varying vec3 N, L0, H0, L1, H1; #include webgl_header.fs
varying vec4 D0, A0, D1, A1;
uniform float fog_r; varying vec3 packed_data_0 ;
uniform float fog_g; varying float fog;
uniform float fog_b; varying vec2 bgTextureLookup;
uniform float fog_enabled;
#ifdef PURE_OPENGL_ES_2
varying vec4 COLOR;
#else
// using the built-in allows to use glShadeModel
#define COLOR gl_Color
#endif
#define NORMAL normalize(packed_data_0.xyz)
uniform bool lighting_enabled; uniform bool lighting_enabled;
uniform bool two_sided_lighting_enabled;
varying float fog; #include anaglyph_header.fs
#include compute_fog_color.fs
#include compute_color_for_light.fs
void main() void main()
{ {
vec3 n, h; vec4 color = ApplyColorEffects(COLOR, gl_FragCoord.z);
float NdotL, NdotH;
vec4 color; if (!isPicking && lighting_enabled){
n = normalize(N); vec3 normal = NORMAL;
NdotL = max(dot(n, normalize(L0)), 0.0); if (two_sided_lighting_enabled){
float shininess = gl_FrontMaterial.shininess; bool ff = gl_FrontFacing ? true : false;
if (!ff)
color = A0; normal = -normal;
if (lighting_enabled){
color = A0 + A1;
if (NdotL > 0.0) {
color += D0 * NdotL;
h = normalize(H0);
NdotH = max(dot(n, h), 0.0);
color += gl_LightSource[0].specular * pow(NdotH, shininess);
}
NdotL = max(dot(n, normalize(L1)), 0.0);
if (NdotL > 0.0) {
color += D1 * NdotL;
h = normalize(H1);
NdotH = max(dot(n, h), 0.0);
color += gl_LightSource[1].specular * pow(NdotH, shininess);
} }
color = ApplyLighting(color, normal);
} }
float cfog = mix(1.0, clamp(fog, 0.0, 1.0), fog_enabled); gl_FragColor = ApplyFog(color, fog);
gl_FragColor = vec4(mix(color.rgb, fog_color, cfog), A0.a);
PostLightingEffects();
} }
 End of changes. 7 change blocks. 
32 lines changed or deleted 29 lines changed or added

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