Fix threadnum calculation if only one processor exists.
Fix transparent objects shadows.