Implement material attribute hashcode