Simplified shading computations

Shading could be simplified by removing method calls and redundant
if-else statements