aboutsummaryrefslogtreecommitdiffstats
path: root/progs/glsl/CH18-mandel.frag
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-05-21 09:32:38 -0700
committerEric Anholt <[email protected]>2010-05-21 12:20:39 -0700
commit68fc4b415e322f6744299e39864fbc377c6eff74 (patch)
tree4bafffd8b0105174f3c5c0ae327a005be9145990 /progs/glsl/CH18-mandel.frag
parente4f4489e3fc0b36d72821b55794fb843b2b7fa5f (diff)
Remove demos that have moved to git+ssh://git.freedesktop.org/git/mesa/demos.
The remaining programs are ones I've had difficulty finding a build environment for to make the build system or are unit tests that should probably live next to their code instead. Hopefully people can bring over the build for remaining pieces they care about.
Diffstat (limited to 'progs/glsl/CH18-mandel.frag')
-rw-r--r--progs/glsl/CH18-mandel.frag55
1 files changed, 0 insertions, 55 deletions
diff --git a/progs/glsl/CH18-mandel.frag b/progs/glsl/CH18-mandel.frag
deleted file mode 100644
index a972d68bcfb..00000000000
--- a/progs/glsl/CH18-mandel.frag
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// Fragment shader for drawing the Mandelbrot set
-//
-// Authors: Dave Baldwin, Steve Koren, Randi Rost
-// based on a shader by Michael Rivero
-//
-// Copyright (c) 2002-2005: 3Dlabs, Inc.
-//
-// See 3Dlabs-License.txt for license information
-//
-
-varying vec3 Position;
-varying float LightIntensity;
-
-uniform float MaxIterations;
-uniform float Zoom;
-uniform float Xcenter;
-uniform float Ycenter;
-uniform vec3 InnerColor;
-uniform vec3 OuterColor1;
-uniform vec3 OuterColor2;
-
-void main()
-{
- float real = Position.x * Zoom + Xcenter;
- float imag = Position.y * Zoom + Ycenter;
- float Creal = real; // Change this line...
- float Cimag = imag; // ...and this one to get a Julia set
-
- float r2 = 0.0;
- float iter;
-
-// for (iter = 0.0; iter < MaxIterations && r2 < 4.0; ++iter)
- for (iter = 0.0; iter < 12.0 && r2 < 4.0; ++iter)
- {
- float tempreal = real;
-
- real = (tempreal * tempreal) - (imag * imag) + Creal;
- imag = 2.0 * tempreal * imag + Cimag;
- r2 = (real * real) + (imag * imag);
- }
-
- // Base the color on the number of iterations
-
- vec3 color;
-
- if (r2 < 4.0)
- color = InnerColor;
- else
- color = mix(OuterColor1, OuterColor2, fract(iter * 0.05));
-
- color *= LightIntensity;
-
- gl_FragColor = vec4(color, 1.0);
-}