Shader-Evolver
--------------

Copyright (c) 2004, Markus Reinhardt

email. m.reinhardt@bitmap-friends.de
web... shader-evolver.bitmap-friends.de

Now that you have found the readme, you might ask yourself: 
"What is the Shader-Evolver?" - I will try to explain. I am currently studying
computer science at the University of Wrburg in Germany. To finish this some 
day, I had to do a practical at "Lehrstuhl fr Informatik II". My research theme
was "Evolution of vertex and pixel shader programs", which I will try to explain
in short words.

First you need to know something about evolutionary computing. This is a problem
solving strategy in computer science. The idea behind this is, to simulate the
natural evolution process in software to solve a specific problem very fast.
Like in nature, the virtual evolution also operates on individuals. Only that in
this case these are not little animals, but data sets, representing a
solution for the problem. 

Lets say we have got one population of wannabe solutions. The evolutionary 
algorithm takes a look at each of them and assigns every one a fitness value. 

In the next step the selection takes place. Based on Darwins 
"Survival of the fittest" only the best individuals get a chance on spreading 
their genetic material. Now some sort of virtual mating takes place among these
superindividuals, which leads to a new generation and a new selection and so on. 

Now what does this all have in common with shaders? You guess, I'm gonna tell
you right away. The individuals in my case are shader programs. At the start of
the program, these are generated at random and are presented to the user. He
now has the duty to assign these more or less different shader effects a fitness
value. After this is done, the first evolution step takes place and the mating
begins. No, this is not visible! What the user will see afterwards is a brand
new shader population, that has hopefully some characteristics of the 
previously selected individuals.

I sure did some experiments during my research and achived some significant
results, which showed that it works. It's not like I got some stunning never 
seen special effect, but its possible to experiment with it. So if you are 
interested in some new out of the box way of generating shaders just have a try.

Unfortunately the Shader-Evolver is not some highly tested piece of software.
Lets just hope it won't crash on your machine... ;)

Above was a very short explanation of what evolutionary computing/algorithm is
all about. Feel free to google for more or try Wikipedia:
http://en.wikipedia.org/wiki/Evolutionary_algorithm

1. Installation
---------------

No installation is needed to use this software. Just copy the entire directory
structure to your hard disk. The folders must not be write protected. 

All needed DLLs are included in the bin folder. Feel free to remove them if 
you've got newer versions installed.
Required libraries: 'cg.dll', 'cgGL.dll' and 'glut32.dll'

2. Run the program
------------------

Navigate to the ./bin folder and execute 'evovs.exe'. Hopefully, when everthing
works fine, you will see the user interface and the first generation of randomly
generated shaders.

3. How to use the program
------------------------

Take a look in the folder ./doc, there you'll find a manual_en.pdf which tries 
explains the usage. Because of the shader contest deadline approaching, I had to
translate the manual from german to english in quite a hurry. I hope it is not
too bad ;)

Please tell me if you have trouble understanding it because of the big gaps I
probably created while translating.

To try some of the different experiments like evolution of lighting shaders or
evolution of reflect/refract shaders you just need to uncomment some lines in
./config/settings.cfg

4. Bugs
-------

- On some machines the program runs at too slow framerates respectively to the 
  CPU speed. Disabling VSync in the properties of the graphics card driver fix
  this.
  
- Pushing the middle mouse button may cause a crash. 
  This is a glut specific issue.
  
- there sure are some more bugs, feel free to email me
  m.reinhardt@bitmap-friends.de

5. Credits
----------

Special thanks go to Dr. Marc Ebner and Prof. Dr. Jrgen Albert at "Lehrstuhl 
fr Informatik II" at the University of Wrzburg, Germany.
The idea of using evolutionary computing to generate vertex and pixel shaders 
originated by Dr. Marc Ebner. The software and composition was worked out by 
me, Markus Reinhardt, during a three month practical.

The software for this work used the GAlib genetic algorithm package, written by 
Matthew Wall at the Massachusetts Institute of Technology.
http://lancet.mit.edu/ga/

Shader-Evolver uses the free CenterPoint - XML library, 
http://www.cpointc.com/XML/

For further information, new program versions and comments feel to contact me. 
  http://shader-evolver.bitmap-friends.de
  m.reinhardt@bitmap-friends.de

6. Software License Agreement
-----------------------------

The zlib/libpng License

Copyright (c) 2004, Markus Reinhardt

This software is provided 'as-is', without any express or implied warranty. 
In no event will the authors be held liable for any damages arising from the u
se of this software.

Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to 
the following restrictions:

    1. The origin of this software must not be misrepresented; 
       you must not claim that you wrote the original software. If you use this
       software in a product, an acknowledgment in the product documentation 
       would be appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be 
       misrepresented as being the original software.

    3. This notice may not be removed or altered from any source distribution.
