Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 作业二三角形重叠部分像素颜色不对

Viewing 2 reply threads
  • Author
    Posts
    • #16691 Score: 0
      lpj
      Participant

      环境:windows+vs
      文件一:结果
      文件二:rasterizater.cpp
      注:复制网上他人的代码也会成功,但是结果还是一样的。是不是电脑问题或者环境配置的问题?

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

      rasterizer的代码

    • #17033 Score: 0
      burnian
      Participant

      我的结果也长这样,重叠部分颜色驳杂。

      • #17046 Score: 0
        burnian
        Participant

        I have solved this issue, the problem was located in the projection matrix which led to the same coordinate z of each point, so all the triangles would overlap together which resulted in the wrong image of the intersecting part. you’d better deduce the projection matrix correctly based on your own coordinate system.

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