cleaned up resource buf interface

Used some templating to remove need for redundant material_buff.

Edit:  there is a companion PR in cycamore.