added changes to rendering logic of npc with fog layer