Version 2 implementation.

- Changed to work as an image effect.
- Added render mode option.
- Added gamma correction to preview display.
- Refactoring in several parts..