Working on particle engine. porting from CgEngine.