-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShadersDemo.h
179 lines (143 loc) · 6.99 KB
/
ShadersDemo.h
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#ifndef SHADERSDEMO_H_INCLUDED
#define SHADERSDEMO_H_INCLUDED
#include "GestionShaders.h"
#include "Variables.h"
class ShadersDemo :public GestionShaders
{
public:
//---------------- Alpha en fonction de la distance à un point:
static GLchar* source_vertex_alphaDist;
static GLchar* source_fragment_alphaDist;
static GLuint shader_alphaDist_id1;
static GLuint shader_alphaDist_id2;
static GLuint programme_alphaDist;
static GLint uniform_alphaDist_texture;
static GLint uniform_alphaDist_point;
static GLint uniform_alphaDist_distMin;
static GLint uniform_alphaDist_distMax;
//---------------- Floutage:
static GLchar* source_fragment_flou_x;
static GLchar* source_fragment_flou_y;
static GLuint shader_floux_id;
static GLuint shader_flouy_id;
static GLuint programme_floux_id;
static GLuint programme_flouy_id;
static GLint uniform_floux_taille;
static GLint uniform_flouy_taille;
static GLint uniform_floux_saturation;
static GLint uniform_flouy_saturation;
static GLint uniform_floux_texture;
static GLint uniform_flouy_texture;
//---------------- Filtres:
static GLchar* source_fragment_filtres;
static GLuint shader_filtres_id;
static GLuint programme_filtres_id;
static GLuint uniform_filtres_texture;
static GLuint uniform_filtres_saturation;
static GLuint uniform_filtres_contraste;
static GLuint uniform_filtres_seuil;
//------------------ Filtre Hue, Saturation, Value:
static GLchar* source_fragment_filtre_HSV;
static GLuint shader_filtre_HSV_id;
static GLuint programme_filtre_HSV_id;
static GLuint uniform_filtre_HSV_texture;
static GLuint uniform_filtre_HSV_Hue;
static GLuint uniform_filtre_HSV_Saturation;
static GLuint uniform_filtre_HSV_Value;
//======== Shader de la fractale de Mandelbrot:
static GLchar* source_vertex_mandelbrot;
static GLchar* source_fragment_mandelbrot;
static GLuint shader_mandelbrot_id1;
static GLuint shader_mandelbrot_id2;
static GLuint programme_mandelbrot;
static GLint uniform_mandelbrot_ecran_ratio;
static GLint uniform_mandelbrot_ajustement_resolution;
static GLint uniform_mandelbrot_zoom;
static GLint uniform_mandelbrot_xpos;
static GLint uniform_mandelbrot_ypos;
static GLint uniform_mandelbrot_alpha;
static GLint uniform_mandelbrot_t;
static GLint uniform_mandelbrot_iter;
static GLint uniform_mandelbrot_ecranDim;
static GLint uniform_mandelbrot_palette;
static GLint uniform_mandelbrot_arriere_plan;
static GLint uniform_mandelbrot_decallage_palette;
//======== Shader du raytracer waterworld:
static GLchar* source_vertex_waterworld;
static GLchar* source_fragment_waterworld;
static GLuint shader_waterworld_id1;
static GLuint shader_waterworld_id2;
static GLuint programme_waterworld;
static GLint uniform_waterworld_random_numer;
static GLint uniform_waterworld_temps;
static GLint uniform_waterworld_numReflec;
static GLint uniform_waterworld_numRefrac;
static GLint uniform_waterworld_Obs;
static GLint uniform_waterworld_ecranDim;
static GLint uniform_waterworld_ajustement_resolution;
static GLint uniform_waterworld_distanceFocale;
static GLint uniform_waterworld_ecran_ratio;
static GLint uniform_waterworld_distanceBrouillard;
static GLint uniform_waterworld_amplitude_vagues;
static GLint uniform_waterworld_C_ciel;
static GLint uniform_waterworld_C_amb;
static GLint uniform_waterworld_L_amb;
static GLint uniform_waterworld_L1;
static GLint uniform_waterworld_objets;
//======== Shader du raytracer spheredance:
static GLchar* source_vertex_spheredance;
static GLchar* source_fragment_spheredance;
static GLuint shader_spheredance_id1;
static GLuint shader_spheredance_id2;
static GLuint programme_spheredance;
static GLint uniform_spheredance_random_numer;
static GLint uniform_spheredance_temps;
static GLint uniform_spheredance_numReflec;
static GLint uniform_spheredance_Obs;
static GLint uniform_spheredance_ecranDim;
static GLint uniform_spheredance_ajustement_resolution;
static GLint uniform_spheredance_distanceFocale;
static GLint uniform_spheredance_ecran_ratio;
static GLint uniform_spheredance_C_ciel;
static GLint uniform_spheredance_C_amb;
static GLint uniform_spheredance_L_amb;
static GLint uniform_spheredance_L1;
static GLint uniform_spheredance_objets;
static GLint uniform_spheredance_distanceBrouillard;
//======== Shader du raytracer hypnostructure:
static GLchar* source_vertex_hypnostructure;
static GLchar* source_fragment_hypnostructure;
static GLuint shader_hypnostructure_id1;
static GLuint shader_hypnostructure_id2;
static GLuint programme_hypnostructure;
static GLint uniform_hypnostructure_random_numer;
static GLint uniform_hypnostructure_temps;
static GLint uniform_hypnostructure_numReflec;
static GLint uniform_hypnostructure_numRefrac;
static GLint uniform_hypnostructure_Obs;
static GLint uniform_hypnostructure_ecranDim;
static GLint uniform_hypnostructure_distanceFocale;
static GLint uniform_hypnostructure_ecran_ratio;
static GLint uniform_hypnostructure_distanceBrouillard;
static GLint uniform_hypnostructure_C_ciel;
static GLint uniform_hypnostructure_C_amb;
static GLint uniform_hypnostructure_L_amb;
static GLint uniform_hypnostructure_L1;
static GLint uniform_hypnostructure_objets;
public:
static bool init_shader_alphaDist();
static bool init_shader_mandelbrot();
static bool init_shader_waterworld();
static bool init_shader_spheredance();
static bool init_shader_hypnostructure();
static bool init_flou();
static bool init_filtres();
static bool init_filtre_HSV();
static bool initShaders();
static void freeShaders();
static void programme_filtres(GLfloat saturation,GLfloat contraste,GLfloat seuil, GLuint texture=0);
static void programme_floux(GLuint taille_hallo,GLfloat saturation_hallo,GLuint texture=0);
static void programme_flouy(GLuint taille_hallo,GLfloat saturation_hallo,GLuint texture=0);
static void programme_filtre_HSV(GLfloat hue, GLfloat saturation, GLfloat value, GLuint texture=0);
};
#endif // SHADERSDEMO_H_INCLUDED