frag shader中直接访问i.pos.z就是深度,不必除以i.pos.w,因为系统已经自动进行过了透视除法且已将i.pos.w置为0。
转:https://www.cnblogs.com/wantnon/p/6919073.html