mightymandel
v16
GPU-based Mandelbrot set explorer
fpxx_approx_vert.glsl
Go to the documentation of this file.
1
// mightymandel -- GPU-based Mandelbrot Set explorer
2
// Copyright (C) 2012,2013,2014 Claude Heiland-Allen
3
// License GPL3+ http://www.gnu.org/licenses/gpl.html
4
5
uniform
double
er2;
6
uniform
int
iters;
7
#ifdef DE
8
uniform dvec2 abcuvw[6];
9
#else
10
uniform dvec2 abcuvw[3];
11
#endif
12
in dvec2 c0;
13
out dvec4 cne;
14
#ifdef DE
15
out dvec4 zdz;
16
#else
17
out dvec2 zdz;
18
#endif
19
out
double
err;
20
void
main
() {
21
dvec2 c = c0.xy;
22
dvec2 c2 =
csqr
(c);
23
dvec2 c3 =
cmul
(c, c2);
24
dvec2 z =
cmul
(abcuvw[0], c) +
cmul
(abcuvw[1], c2) +
cmul
(abcuvw[2], c3);
25
#ifdef DE
26
dvec2 dz =
cmul
(abcuvw[3], c) +
cmul
(abcuvw[4], c2) +
cmul
(abcuvw[5], c3);
27
#endif
28
cne = dvec4(c,
double
(iters), 0.0);
29
#ifdef DE
30
zdz = dvec4(z, dz);
31
#else
32
zdz = dvec2(z);
33
#endif
34
err = 0.0;
35
}
src
fpxx_approx_vert.glsl
Generated on Mon Jan 19 2015 16:18:12 for mightymandel by
1.8.1.2