Viewing 3 reply threads
  • Author
    Posts
    • #6525 Score: 1
      Prosat
      Participant
      1 pt

      我的作业2和作业3中,覆盖都出现了错误,如图所示,查找了各种帖子也没找出我的错误在哪,主要代码如下:
      希望有大神能够解决我的问题!谢谢!

      This post has received 1 vote up.
      Attachments:
      You must be logged in to view attached files.
    • #6531 Score: 0
      oxine
      Participant
      9 pts

      投影矩阵错了呗

      • #6532 Score: 0
        Prosat
        Participant
        1 pt

        大佬,哪里错了呢,实在找不出来

    • #6564 Score: 0
      xianlong
      Participant

      你试试打印一下 三角形的坐标 看下z是多少

      Attachments:
      You must be logged in to view attached files.
    • #6566 Score: 0
      xianlong
      Participant

      我之前出现了 浅绿色三角形覆盖蓝色三角形 看了你的代码后,我才发现我的zNear跟zFar没变成负数,谢谢你~

      • #6633 Score: 0
        猫王
        Participant

        我也有相同的疑惑。根据闫神课堂的解释,n 和 f 都应该是负数。代码中 zNear 和 zFar 都是正数。所以,我也在函数 get_projection_matrix 里将它们设置为负数。这样蓝色三角形覆盖了浅绿色三角形,但与作业2中答案的覆盖顺序相反。是作业中的答案不对吗?

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