mightymandel
v16
GPU-based Mandelbrot set explorer
fp32_escaped_geom.glsl
Go to the documentation of this file.
1
// mightymandel -- GPU-based Mandelbrot Set explorer
2
// Copyright (C) 2012,2013,2014,2015 Claude Heiland-Allen
3
// License GPL3+ http://www.gnu.org/licenses/gpl.html
4
5
layout(points) in;
6
layout(points, max_vertices = 1) out;
7
uniform vec2 center;
8
uniform
float
radius;
9
uniform
float
aspect;
10
in vec4 cne1[1];
11
#ifdef DE
12
in vec4 zdz1[1];
13
#else
14
in vec2 zdz1[1];
15
#endif
16
flat out vec4 cne;
17
#ifdef DE
18
flat out vec4 zdz;
19
#else
20
flat out vec2 zdz;
21
#endif
22
void
main
() {
23
bool
escaped = ! (cne1[0].w <= 0);
24
if
(escaped) {
25
cne = cne1[0];
26
zdz = zdz1[0];
27
gl_Position = vec4((cne1[0].xy - center) / radius * vec2(aspect, 1.0), 0.0, 1.0);
28
EmitVertex();
29
EndPrimitive();
30
}
31
}
src
fp32_escaped_geom.glsl
Generated on Mon Jan 19 2015 16:18:12 for mightymandel by
1.8.1.2