refactoring: compute cashed values
refactoring: do not cache color in material
refactoring