shader deserialization refactored - fixes #241