Home Forums Games202-高质量实时渲染 [作业2]关于环境光映射的问题

Viewing 3 reply threads
  • Author
    Posts
    • #8433 Score: 0
      Participant

      我的环境光映射球谐函数的代码如下

      auto delta_wi = CalcArea(x, y, width, height);
      
                          for (int l = 0; l <= SHOrder; l++) {
                              for (int m = -l; m <= l; m++) {
                                  int k = sh::GetIndex(l, m);
                                  double SH = sh::EvalSH(l, m, dir.cast<double>().normalized());
                                  SHCoeffiecents[k] += Le * delta_wi * SH;
                              }
                          }

      然后debug的图感觉很白,没有颜色的感觉。
      请问是哪里有问题吗?

      Attachments:
      You must be logged in to view attached files.
    • #8494 Score: 0
      宇道人
      Participant

      这是对的,PPT里面就是这个图。
      你可以试试在scenes/prt.xml里面改别的cubemap,就能有颜色了

      • #8539 Score: 0
        Participant

        谢谢。确实是对的

    • #16624 Score: 0
      竹名茂
      Participant

      请问下GetIndex在哪里定义的啊

    • #16625 Score: 0
      竹名茂
      Participant

      不好意思。头文件里。

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