Potential fix for a bug where spot lights did not have correct containment tests.
Fix a rendering bug caused by meshes that are configured so that their depth is not written.

This commit also fixes a bug with meshes rendered using a refractive material.
Fix a serialization bug.