This file is indexed.

/usr/share/games/pink-pony/GLSL/pony.frag is in pink-pony-data 1.4.1-1build1.

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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
uniform sampler2D texture;

uniform vec3 hemi_pole;
uniform vec4 hemi_sky;
uniform vec4 hemi_ground;

uniform float velvet_coeff;

varying vec3 light;
varying vec3 normal;
varying vec3 eye;


vec4 basecolor()
{
    return texture2D(texture, gl_TexCoord[0].st);
}

vec4 diffuse (vec3 l, vec3 n, vec3 v, int light_no)
{
    
    vec4 color = gl_LightSource[light_no].diffuse;
    
    return color * max(0.0, dot(l, n)) * 1.3;
} 

vec4 hemisphere (vec3 n)
{
    vec3 p = gl_NormalMatrix * hemi_pole;

    float cos_phi = dot(n, p);
    float i = 0.5 + (0.5 * cos_phi);

    return mix(hemi_ground, hemi_sky, i);
}

float velvet (vec3 l, vec3 n, vec3 v, float exp)
{    
    return velvet_coeff * 2.0 * pow(1.0 - max(0.0, dot(v, n)), exp);
}

float velvet2 (vec3 l, vec3 n, vec3 v, float exp)
{
    vec4 color = gl_LightSource[0].diffuse;

    return (velvet_coeff 
            * pow(1.0 - max(0.0, dot(v, n)), exp) 
            * dot(l, n) * -1.0);            
}

void main (void)
{
    vec3 my_normal = normalize(normal);
    vec3 my_eye = normalize(eye);

    vec4 hemi = hemisphere (my_normal);
    vec4 diff = diffuse(light, my_normal, -my_eye, 0);
    vec4 col = hemi + diff;
    
    gl_FragColor = gl_Color * basecolor() 
                   * (col + 
                      0.5 * velvet2(light, my_normal, -my_eye, 3.0));
}