/usr/share/libavogadro/shaders/x-ray.frag is in avogadro-data 1.2.0-1+deb9u1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | // X-ray shader
// Opacity is proportional to angle between view vector and surface normal.
// Fragment whose dNormal is less than a specified threshold are discarded; i.e.
// flat areas facing the viewer are completely transparent
varying vec3 ViewDirection;
varying vec3 Normal;
uniform float minOpacity;
uniform float maxOpacity;
uniform vec3 color;
uniform float da;
void main(void)
{
float opacity = 1.0 - abs( dot( ViewDirection, Normal ) );
opacity = clamp( opacity, minOpacity, maxOpacity );
if( opacity < da ) discard;
gl_FragColor = vec4( color, opacity );
}
|