Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 作业三bump与displacement显示问题

Viewing 6 reply threads
  • Author
    Posts
    • #3882 Score: 0

      按照代码书写后,bump与displacement显示如下:
      显示结果不对

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

      补充说明:就是bump下,显示不出来凹凸纹理,而displacement下显示过暗,在bump中,我的dU实现如下:
      dU = kh * kn * (payload.texture->getColor(payload.tex_coords[0]+1/payload.texture->width,payload.tex_coords[1]).norm()-payload.texture->getColor(payload.tex_coords[0],payload.tex_coords[1]).norm());

    • #3886 Score: 0
      xuyonglai
      Participant
      3 pts

      我bump的结果和你一样,显示不出来凹凸纹理

    • #3891 Score: 0
      MasterBoom
      Participant

      结果一样,整了一下午,bump还是整不动,凹凸纹理出不来 : (

    • #3899 Score: 1
      xuyonglai
      Participant
      3 pts

      我找到错了 1改为1.0 就行了 低级错误

      This post has received 1 vote up.
    • #3900 Score: 0
      xuyonglai
      Participant
      3 pts

      w与h都是int类型的 1/w 1/h为零了

      • #3903 Score: 0
        助教
        Keymaster
        14 pts

        原来是这样,估计那两位也是了吧。

    • #3906 Score: 0

      楼上正解:将1改为1.0,问题解决,凹凸纹理显示出来了

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