bg.fs (pymol-v2.1.0.tar.bz2) | : | bg.fs (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
#ifdef PURE_OPENGL_ES_2 | ||||
precision highp float; | ||||
#endif | ||||
uniform sampler2D bgTextureMap; | #include anaglyph_header.fs | |||
varying vec2 bgTextureLookup ; | ||||
uniform vec3 fogSolidColor; | varying vec2 bgTextureLookup ; | |||
uniform float fogIsSolidColor; | ||||
uniform vec2 viewImageSize; | #include compute_fog_color.fs | |||
uniform vec2 pixelSize; | ||||
uniform vec2 halfPixel; | ||||
void main() | void main() | |||
{ | { | |||
#ifdef bg_image_mode_stretched | gl_FragColor = vec4(ComputeBgColor(), 1.); | |||
vec2 bgLookup = pixelSize * floor(bgTextureLookup / pixelSize); | ||||
vec4 bgColor = texture2D(bgTextureMap, bgLookup); | ||||
gl_FragColor = vec4(bgColor.rgb*bgColor.a + (1.-bgColor.a) * fogSolidColor.rgb | ||||
, 1.); | ||||
#endif | ||||
#ifdef bg_image_mode_solid | ||||
gl_FragColor = vec4(fogSolidColor.rgb, 1.); | ||||
#endif | ||||
} | } | |||
End of changes. 5 change blocks. | ||||
16 lines changed or deleted | 7 lines changed or added |