Home › Forums › GAMES在线课程(现代计算机图形学入门)讨论区 › ViewportTransform中关于z轴的变化 This topic has 2 replies, 3 voices, and was last updated 4 years, 7 months ago by chenzhekl. Viewing 1 reply thread Author Posts 2020年3月8日 at 下午5:39 #3579 Score: 0 feixiakuParticipant 在做viewport transform的时候,理解x/y轴从NDC空间[-1, 1]变化到屏幕空间的[0,width],[0, height],但是不明白z轴的变换时怎么得来的,希望可以解惑! This topic was modified 4 years, 8 months ago by feixiaku. Attachments:You must be logged in to view attached files. 2020年3月9日 at 上午12:41 #3635 Score: 1 Shi YuChen(助教)Keymaster Karma: 4 pts 这里只是单纯的将z的值平移加放缩到正数。另外对于本次的作业,如果是按闫老师的推到过程得到的透视投影矩阵(右手系),应将此句改为vert.z()=-vert.z()*f1+f2,或者初始化depth-buffer时初始化为负无穷。 This post has received 1 vote up. 2020年4月23日 at 下午11:10 #6032 Score: 0 chenzheklParticipant 我有个问题,f1 和 f2 的值是如何选取的呢?因为做完 MVP 之后 z 的范围是 [-1, 1],似乎没有必要做这么大的平移和缩放。 This reply was modified 4 years, 7 months ago by chenzhekl. Author Posts Viewing 1 reply thread You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In