Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 关于作业2两个三角形重叠部分的Z-Buffer问题

Viewing 3 reply threads
  • Author
    Posts
    • #7332 Score: 0
      luuuuyang
      Participant
      1 pt

      在两个三角形的重叠部分上,浅蓝色三角形上的一些像素点绘制在了浅绿色三角形上面,为什么会出现z值较大的像素点覆盖z值较小的像素点这种情况?

      Attachments:
      You must be logged in to view attached files.
    • #7337 Score: 0
      苏丛
      Participant
      2 pts

      这两张图看起来都没问题

      • #7339 Score: 0
        luuuuyang
        Participant
        1 pt

        再添加一张来自作业1的get_projection_matrix函数的截图

        • This reply was modified 1 year, 2 months ago by luuuuyang.
        Attachments:
        You must be logged in to view attached files.
    • #7342 Score: 1
      luuuuyang
      Participant
      1 pt

      问题已解答
      是由于两个三角形的深度信息也就是z值不正确导致的。
      参考其他帖子了解到在提供的框架中,在将z值从负值反转的正值的过程中少了一个负号,加上就能计算出正确的z值,可以参考下图注释及注释下一行

      This post has received 1 vote up.
      • This reply was modified 1 year, 2 months ago by luuuuyang.
      Attachments:
      You must be logged in to view attached files.
    • #7648 Score: 0
      wjwABCDEFG
      Participant

      请问楼主,为什么你不会出现中心对称问题(作业1和作业3也存在),如何解决?

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