60827566 shading sdd

Fixes http://code.google.com/p/cbecc/issues/list?cursor=cbecc%3A361&ts=1386716547&updated=361 and http://code.google.com/p/cbecc/issues/list?cursor=cbecc%3A344&ts=1386716541&updated=344