Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #5135 Score: 0
      刘道明
      Participant

      我看PDF说的是“我们已经把z进行了翻转,都是正数越大离视点越远”。
      请问这里说的翻转是代码中darw()里面的

      
      for(auto& vert :v){
      ....
      vert.z()=vert.z()*f1+f2;
      }
      

      吗?
      这里怎么看出越远越大的?这不是一个正比例线性函数吗?大小关系不会发生改变。
      按这个z比较z-buffer出来的结果蓝色在前面,绿色在后面。
      不太懂,有大佬能解释一下吗?

      • This topic was modified 3 years, 12 months ago by 刘道明.
    • #5137 Score: 0
      刘道明
      Participant

      发现问题了,是投影时z轴缩放的near,far与-1,1的对应问题。

    • #6404 Score: 0
      Enoch
      Participant
      1 pt

      请问这里的f1和f2分别指什么?

Viewing 2 reply threads
  • You must be logged in to reply to this topic.