Optimize geometry shader