Finished Code for Shadow Materials