|
30 | 30 | RTCORE_ALIGN(16) struct RTCRay1
|
31 | 31 | {
|
32 | 32 | /* ray data */
|
33 |
| - float org[3]; //!< Ray origin |
34 |
| - float align0; //!< unused member to force alignment of following members |
| 33 | + uniform float org[3]; //!< Ray origin |
| 34 | + uniform float align0; //!< unused member to force alignment of following members |
35 | 35 |
|
36 |
| - float dir[3]; //!< Ray direction |
37 |
| - float align1; //!< unused member to force alignment of following members |
| 36 | + uniform float dir[3]; //!< Ray direction |
| 37 | + uniform float align1; //!< unused member to force alignment of following members |
38 | 38 |
|
39 |
| - float tnear; //!< Start of ray segment |
40 |
| - float tfar; //!< End of ray segment (set to hit distance) |
41 |
| - float time; //!< Time of this ray for motion blur |
42 |
| - int mask; //!< Used to mask out objects during traversal |
| 39 | + uniform float tnear; //!< Start of ray segment |
| 40 | + uniform float tfar; //!< End of ray segment (set to hit distance) |
| 41 | + uniform float time; //!< Time of this ray for motion blur |
| 42 | + uniform int mask; //!< Used to mask out objects during traversal |
43 | 43 |
|
44 | 44 | /* hit data */
|
45 |
| - float Ng[3]; //!< Unnormalized geometry normal |
46 |
| - float align2; |
| 45 | + uniform float Ng[3]; //!< Unnormalized geometry normal |
| 46 | + uniform float align2; |
47 | 47 |
|
48 |
| - float u; //!< Barycentric u coordinate of hit |
49 |
| - float v; //!< Barycentric v coordinate of hit |
| 48 | + uniform float u; //!< Barycentric u coordinate of hit |
| 49 | + uniform float v; //!< Barycentric v coordinate of hit |
50 | 50 |
|
51 |
| - int geomID; //!< geometry ID |
52 |
| - int primID; //!< primitive ID |
53 |
| - int instID; //!< instance ID |
| 51 | + uniform int geomID; //!< geometry ID |
| 52 | + uniform int primID; //!< primitive ID |
| 53 | + uniform int instID; //!< instance ID |
| 54 | + |
| 55 | + varying float align[0]; //!< this variable causes ISPC to align the struct on the stack |
54 | 56 | };
|
55 | 57 |
|
56 | 58 | /*! Ray structure for packets of 4 rays. */
|
|
0 commit comments