Home Forums GAMES在线课程(现代计算机图形学入门)讨论区 请问我作业三生成的图片上有黑点是怎么回事

Viewing 2 reply threads
  • Author
    Posts
    • #8947 Score: 0
      Yifeng Xiang
      Participant

      如题,排查了一上午不知道哪里出问题了

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

      你是在考验同学们虚空debug的能力吗?

    • #20011 Score: 0
      febilly
      Participant

      我也碰到这种问题了,最后查出来是浮点数的精度问题
      在进行浮点数比较的时候留一点点余量出来就解决了
      比如,如果要判断alpha是不是在0~1之内的话,把代码里面的 alpha < 0 换成 alpha < -0.001

      Attachments:
      You must be logged in to view attached files.
Viewing 2 reply threads
  • You must be logged in to reply to this topic.