Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 代码中对顶点法线的坐标变换是否错误?

Viewing 2 reply threads
  • Author
    Posts
    • #4041 Score: 0
      Keneyr
      Participant
      7 pts

      在rasterrize.cpp文件中,对顶点法线的变换是这样的,看样子是把model space下的normal变换到view space下的normal。这里是否写错了?

      正确的应该是把normal变换到world space吧。。。

      Attachments:
      You must be logged in to view attached files.
    • #4181 Score: 0
      sQ
      Participant
      1 pt
    • #5335 Score: 0
      fuzhanzhan
      Participant

      着色可以在world space 或者 view space 中进行,只要相关的向量都在同一个空间就行,而代码中选择在 view space 中进行,所以都变换到 view space 中了。

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