label.fs (pymol-v2.1.0.tar.bz2) | : | label.fs (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
#ifdef PURE_OPENGL_ES_2 | ||||
precision highp float; | ||||
#endif | ||||
/* ios recent */ | /* ios recent */ | |||
uniform sampler2D textureMap; | uniform sampler2D textureMap; | |||
varying vec2 textureLookup ; | varying vec2 textureLookup ; | |||
varying vec4 pickcolor ; | varying vec4 pickcolor ; | |||
uniform float isPicking; | ||||
uniform sampler2D bgTextureMap; | ||||
uniform vec3 fogSolidColor; | ||||
uniform float fogIsSolidColor; | ||||
varying float fog; | varying float fog; | |||
varying vec3 normalizedViewCoordinate; | varying vec3 normalizedViewCoordinate; | |||
#define bgTextureLookup normalizedViewCoordinate.xy | #define bgTextureLookup normalizedViewCoordinate.xy | |||
uniform float isStretched; | #include anaglyph_header.fs | |||
uniform float isCentered; | #include compute_fog_color.fs | |||
uniform float isCenteredOrRepeated; | ||||
uniform float isTiled; | ||||
uniform vec2 tileSize; | ||||
uniform vec2 tiledSize; | ||||
uniform vec2 viewImageSize; | ||||
uniform vec2 pixelSize; | ||||
uniform vec2 halfPixel; | ||||
#include ComputeFogColor | ||||
void main() | void main() | |||
{ | { | |||
vec4 fColor = texture2D(textureMap, textureLookup); | if (isPicking) { | |||
if (fog < 1.0) { | gl_FragColor = pickcolor; | |||
vec4 fogColor = ComputeFogColor(); | } else { | |||
fColor.rgb = mix(fogColor.rgb, fColor.rgb, fog); | gl_FragColor = texture2D(textureMap, textureLookup); | |||
} | ||||
#ifdef PYMOL_IOS | #ifdef PYMOL_IOS | |||
vec4 npColor = (1. - isPicking) * fColor; | if (gl_FragColor.a < .1) | |||
if (npColor.a < .1) | discard; | |||
discard; | ||||
gl_FragColor = npColor + isPicking * pickcolor; | ||||
#else | #else | |||
gl_FragColor = (1. - isPicking) * fColor + isPicking * pickcolor; | if (gl_FragColor.a < .05) | |||
discard; | ||||
#endif | #endif | |||
gl_FragColor = ApplyColorEffects(gl_FragColor, gl_FragCoord.z); | ||||
gl_FragColor = ApplyFog(gl_FragColor, fog); | ||||
#ifdef NO_ORDER_TRANSP | ||||
setFragDataForNoOrderTransp(gl_FragCoord.z); | ||||
#endif | ||||
} | ||||
} | } | |||
End of changes. 8 change blocks. | ||||
25 lines changed or deleted | 23 lines changed or added |