Add texture comparing modes.

Proper shadow mapping needs this.
Add polygon offsets.