indicator.fs (pymol-v2.1.0.tar.bz2) | : | indicator.fs (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
#ifdef PYMOL_IOS | #ifdef PYMOL_WEBGL_IOS | |||
precision mediump float; | precision highp float; | |||
#else | #else | |||
#version 120 | #version 120 | |||
#endif | #endif | |||
uniform sampler2D textureMap; | uniform sampler2D textureMap; | |||
uniform vec2 textureLookup ; | uniform vec2 textureLookup ; | |||
uniform vec2 textureScale ; | uniform vec2 textureScale ; | |||
uniform float g_pointSize; | ||||
uniform vec4 viewport; | ||||
#include ANAGLYPH_HEADER | #include anaglyph_header.fs | |||
varying vec4 POS; | ||||
/* | ||||
* On graphics drivers which are not buggy, this should be | ||||
* equivalent to gl_PointCoord. | ||||
*/ | ||||
vec2 get_pointcoord() { | ||||
vec2 p = viewport.xy + 0.5 * (POS.xy / POS.w + 1.0) * viewport.zw; | ||||
return (gl_FragCoord.xy - p) / g_pointSize + 0.5; | ||||
} | ||||
void main() | void main() | |||
{ | { | |||
vec4 fColor = texture2D(textureMap, textureLookup + gl_PointCoord * textureSca | gl_FragColor = texture2D(textureMap, textureLookup + get_pointcoord() * texture | |||
le); | Scale); | |||
#include ANAGLYPH_BODY | PostLightingEffects(); | |||
} | } | |||
End of changes. 4 change blocks. | ||||
6 lines changed or deleted | 19 lines changed or added |