fixed a problem in gbuffer, thus improve performance