- fix d-material example

sorry, i just made some refactoring