This file is indexed.

/usr/share/k3d/shaders/k3d_pshad.h is in k3d-data 0.8.0.3-3build1.

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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/************************************************************************
 * pshad.h - define macros for easy use of reference meshes and texture
 *           spaces.
 *
 * This file is meant to be included in shaders which use solid
 * texturing.  It provides two macros:
 *
 * PSHAD_PARAMS(space,freq) - put this macro in the parameter list of 
 *                your shader to declare a shadingspace parameter (and 
 *                optionally Pref, if USE_PREF is nonzero).  Takes as
 *                arguments the default shading space name and frequency.
 *
 * DEFAULT_PSHAD_PARAMS - calls PSHAD_PARAMS with default space "shader"
 *                and default frequency 1.
 *
 * GET_PSHAD    - put this in the body of your shader, near the top.
 *                It sets Pshad to the shading coordinates of P (or Pref,
 *                if provided), and sets dPshad to the expected change
 *                in Pshad between adjacent shading samples.
 *
 * This file expects that the .sl file #define's the symbol USE_PREF
 * _prior_ to inclusion of this header file.  
 *
 * Author: Larry Gritz (gritzl@acm.org)
 *
 * Reference:
 *   _Advanced RenderMan: Creating CGI for Motion Picture_, 
 *   by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999.
 *
 * $Revision: 1.1 $    $Date: 2004/05/19 18:15:20 $
 *
 ************************************************************************/


#ifndef PSHAD_H
#define PSHAD_H 1


#ifndef FILTERWIDTH_H
#include "k3d_filterwidth.h"    /* Needed for filterwidth and friends */
#endif



/* If USE_PREF is not defined prior to inclusion of this file, assume
 * that Pref will not be used.
 */
#ifndef USE_PREF
#define USE_PREF 0
#endif

#if (USE_PREF)

/* Pick an unlikely point value to let us recognize an uninitialized,
 * and therefore nonexistant, Pref.
 */
#define UNINITIALIZED_PREF point (-1e10, -1e10, -1e10)

#define PSHAD_PARAMS(spacedefault,freqdefault) \
                     varying point Pref = UNINITIALIZED_PREF;           \
                     string shadingspace = spacedefault;                \
                     float shadingfreq = freqdefault

#define GET_PSHAD    varying point Pshad;                               \
                     if (Pref != UNINITIALIZED_PREF)                    \
                          Pshad = transform (shadingspace, Pref);       \
                     else Pshad = transform (shadingspace, P);          \
                     Pshad *= shadingfreq;                              \
                     float dPshad = filterwidthp(Pshad)

#else /* if (USE_PREF) */

#define PSHAD_PARAMS(spacedefault,freqdefault) \
                     string shadingspace = spacedefault;                \
                     float shadingfreq = freqdefault

#define GET_PSHAD    varying point Pshad;                               \
                     Pshad = shadingfreq * transform (shadingspace, P); \
                     float dPshad = filterwidthp(Pshad)

#endif /* USE_PREF */

#define DEFAULT_PSHAD_PARAMS PSHAD_PARAMS("shader",1)

#endif /* defined(PSHAD_H) */