Home Forums Games202-高质量实时渲染 关于【作业2】实时球谐光照计算部分

Viewing 1 reply thread
  • Author
    Posts
    • #8299 Score: 0
      劉文刀
      Participant

      出现了如图所示的错误,个人理解是不同shader里使用的变量不同,但在render时进行的变量访问的操作是一样的,所以找不到某些变量的定义,访问出错。但按自己的理解更改之后,仍然出现这个错误。请教下各位这个问题应该如何修改

      Attachments:
      You must be logged in to view attached files.
    • #8303 Score: 0
      YunHsiao
      Participant
      19 pts

      作业框架里写死了 position 和 normal 的 attribute pointer 指定过程,但如果你在 shader 里没用到的话是 inactive 的,gl 的反射函数取不到 location 信息自然就报错了。应该不用太在意这个问题。要修复就要确保 shader 里用一下 aNormalPosition 之类的.

      • This reply was modified 2 years, 12 months ago by YunHsiao.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.