/usr/share/glmark2/shaders/buffer-wireframe.frag is in glmark2-data 2014.03+git20150611.fa71af2d-0ubuntu4.
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 | varying vec4 dist;
const vec4 LINE_COLOR = vec4(1.0);
const vec4 TRIANGLE_COLOR = vec4(0.0, 0.5, 0.8, 0.8);
void main(void)
{
// Get the minimum distance of this fragment from a triangle edge.
// We need to multiply with dist.w to undo the workaround we had
// to perform to get linear interpolation (instead of perspective correct).
float d = min(dist.x * dist.w, min(dist.y * dist.w, dist.z * dist.w));
// Get the intensity of the wireframe line
float I = exp2(-2.0 * d * d);
gl_FragColor = mix(TRIANGLE_COLOR, LINE_COLOR, I);
}
|