A hit's material code: the triangle's (triangleCode, material + 1) when it has one, else the instance's from its flags word.
triangleCode
flags
A hit's material code: the triangle's (
triangleCode, material + 1) when it has one, else the instance's from itsflagsword.