1 |
#ifndef SHADER_VARS_H |
2 |
#define SHADER_VARS_H |
3 |
|
4 |
#include "shader.h" |
5 |
|
6 |
namespace shader { |
7 |
namespace compile { |
8 |
extern struct vin |
9 |
{ |
10 |
static const gluvar vertex; |
11 |
static const gluvar normal; |
12 |
static const gluvar color; |
13 |
static const gluvar secondary_color; |
14 |
static const gluvar tex_coord[8]; |
15 |
static const gluvar fog_coord; |
16 |
} vin; |
17 |
|
18 |
extern struct vout |
19 |
{ |
20 |
// glstate builtin |
21 |
static const gluvar position; |
22 |
static const gluvar point_size; |
23 |
static const gluvar clip_vertex; |
24 |
|
25 |
// standard varying |
26 |
static const gluvar front_color; |
27 |
static const gluvar back_color; |
28 |
static const gluvar front_secondary_color; |
29 |
static const gluvar back_secondary_color; |
30 |
static const gluvar tex_coord[8]; |
31 |
static const gluvar fog_frag_coord; |
32 |
} vout; |
33 |
|
34 |
extern struct fin |
35 |
{ |
36 |
// glstate builtin |
37 |
static const gluvar frag_coord; |
38 |
static const gluvar front_facing; |
39 |
|
40 |
// standard varying |
41 |
static const gluvar color; |
42 |
static const gluvar secondary_color; |
43 |
static const gluvar tex_coord[8]; |
44 |
static const gluvar fog_frag_coord; |
45 |
} fin; |
46 |
|
47 |
extern struct fout |
48 |
{ |
49 |
// glstate builtin |
50 |
static const gluvar frag_color; |
51 |
static const gluvar frag_depth; |
52 |
static const gluvar frag_data[2]; |
53 |
} fout; |
54 |
|
55 |
// predefined globals |
56 |
extern gluvar model_view_matrix, |
57 |
projection_matrix, |
58 |
model_view_projection_matrix, |
59 |
texture_matrix[8]; |
60 |
extern gluvar model_view_matrix_inverse, |
61 |
projection_matrix_inverse, |
62 |
model_view_projection_matrix_inverse, |
63 |
texture_matrix_inverse[8]; |
64 |
extern gluvar model_view_matrix_transpose, |
65 |
projection_matrix_transpose, |
66 |
model_view_projection_matrix_transpose, |
67 |
texture_matrix_transpose[8]; |
68 |
extern gluvar model_view_matrix_inverse_transpose, |
69 |
projection_matrix_inverse_transpose, |
70 |
model_view_projection_matrix_inverse_transpose, |
71 |
texture_matrix_inverse_transpose[8]; |
72 |
|
73 |
extern gluvar normal_matrix; |
74 |
|
75 |
extern gluvar normal_scale; |
76 |
extern gluvar depth_range_near, depth_range_far, depth_range_diff; |
77 |
|
78 |
extern gluvar clip_plane[2];//TODO |
79 |
|
80 |
// point parameters TODO |
81 |
|
82 |
extern gluvar front_material_emission, |
83 |
front_material_ambient, |
84 |
front_material_diffuse, |
85 |
front_material_specular, |
86 |
front_material_shininess; |
87 |
extern gluvar back_material_emission, |
88 |
back_material_ambient, |
89 |
back_material_diffuse, |
90 |
back_material_specular, |
91 |
back_material_shininess; |
92 |
|
93 |
// light source parameters TODO |
94 |
|
95 |
extern gluvar light_model_ambient; |
96 |
extern gluvar front_light_model_product_scene_color; |
97 |
extern gluvar back_light_model_product_scene_color; |
98 |
|
99 |
// light products TODO |
100 |
// texture env and gen TODO |
101 |
// fogparameters TODO |
102 |
|
103 |
// shader output are in vout and fout |
104 |
} |
105 |
} |
106 |
|
107 |
#endif |
108 |
|
109 |
|