Morphing by rotation: A Genetic Algorithm

 

Today was a fun, fun Sunday!

Here is how to reproduce: Continue reading

Advertisements

Handling fog with multipass lighting

3968508808_68c7ea6947_bThe thought of fog problems with multipass lighting has prevented me from using multipass in my renderers for too long. Today I decided to stop and think about it for a minute, and the solution is very simple!

Fog is implemented as a linear interpolation between the shaded color of the pixel and the fog color, using a fog factor. In my case the fog factor is calculated like this:

float fog_factor = exp2(-abs(view_dist * fog density)); Continue reading