Added some experimental code to cache the render mat data to prevent getting a crash with "out of material render data".