Viewing 7 reply threads
  • Author
    Posts
    • #3860 Score: 0
      夏莉莉
      Participant

      如下图,有人碰到这个错误吗,明明已经在code里加上了#include <optional>,但还是报错。

      Attachments:
      You must be logged in to view attached files.
    • #3862 Score: 0
      夏莉莉
      Participant

      我用的是新的代码框架

    • #3865 Score: 0
      助教
      Keymaster
      14 pts

      是在课程提供的虚拟机上编译的吗?

    • #3867 Score: 0
      夏莉莉
      Participant

      是的

    • #3868 Score: 0
      夏莉莉
      Participant

      还想问一个问题,是关于漫反射公式的,代码里提供的kd是vector3f,(I/r^2)计算出来应该也是vector3f,图片里这两个向量是点乘吗,还是叉乘啊

      Attachments:
      You must be logged in to view attached files.
      • #3872 Score: 0
        助教
        Keymaster
        14 pts

        既不是点积也不是叉积,是对应维相乘 (cwiseProduct)

    • #3871 Score: 0
      夏莉莉
      Participant

      关于代码编译错误,和我rasterize_triangle()里调用payload()时第四个参数是t.tex没关系吧,因为它显示的是.hpp里有错误

      • #3874 Score: 0
        助教
        Keymaster
        14 pts

        建议严格按照注释提示的 // Use: fragment_shader_payload payload( interpolated_color, interpolated_normal.normalized(), interpolated_texcoords, texture ? &*texture : nullptr); 来实现。

    • #3873 Score: 0
      夏莉莉
      Participant

      对应维相乘在代码里怎么做呢,是直接*吗

    • #3876 Score: 0
      夏莉莉
      Participant

      好的,我去改正一下

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