[DF-29] fix for material reference counting
[DF-29] fog managing